You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: opt-in flag to require presence of declared optional properties #282
I am wondering if we could add an opt-in flag (require_properties_presence or a shorter name) to also require presence of properties declared in properties (even if not in required)?
Default behavior should stay unchanged and spec-compliant.
Why this is useful
For contract/feature tests, we need to detect missing or accidental field removals inAPI responses.
Today, this requires custom recursive checks on top of openapi-schema-validator.
I believe this aligns with existing requiredResponse Properties Policy functionality in openapi-core. We need to move enforce_properties_required property and build_enforce_properties_required_validator function here. It shouldn;t be a problem.
Activity
p1c2u commentedon Apr 24, 2026
Hi @dmb225 , thank you for the report.
I believe this aligns with existing
requiredResponse Properties Policy functionality inopenapi-core. We need to moveenforce_properties_requiredproperty andbuild_enforce_properties_required_validatorfunction here. It shouldn;t be a problem.dmb225 commentedon Apr 27, 2026
Thanks