[Bug]: Mutual exclusion by use of additionalProperties: false
across union types
#803
Labels
kind/bug
Indicates an issue
additionalProperties: false
across union types
#803
Actual Behavior
If
additionalProperties: false
is declared in components and being combined into one byallOf
, validation unconditionally fails.Let's say we have following OpenAPI spec:
This spec compiles without any problem. But when validating actual request with this spec, validator fails with following error message:
Expected Behavior
I think openapi-core should behave one of following:
additionalProperties: false
in context of union types (allOf
) at schema lvel.Steps to Reproduce
Validate
{"foo": "-", "bar": "-"}
with spec supplied above.OpenAPI Core Version
0.19.0
OpenAPI Core Integration
pydantic
Affected Area(s)
validation
References
No response
Anything else we need to know?
No response
Would you like to implement a fix?
Yes
The text was updated successfully, but these errors were encountered: