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
OpenAPI v3 definesadditionalProperties attribute as Value can be boolean or object. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema. Consistent with JSON Schema, additionalProperties defaults to true.
Problem
additionalProperties: false is not taken into account when validating JSON - a payload with attributes that are not listed in schema will still be valid.
It only happens when additionalProperties is declared inside anyOf / allOf block
Background
OpenAPI v3 defines
additionalProperties
attribute asValue can be boolean or object. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema. Consistent with JSON Schema, additionalProperties defaults to true.
Problem
additionalProperties: false
is not taken into account when validating JSON - a payload with attributes that are not listed in schema will still be valid.It only happens when
additionalProperties
is declared inside anyOf / allOf blockSteps to reproduce
Result
The text was updated successfully, but these errors were encountered: