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
additionalProperties: false is not compatible with OpenAPI's inheritance model using allOf [1]. This is blocking for strict validation of JSON request bodies that depend on inheritance (JSON request bodies are not strictly validated #837).
Similar issues exist when combining nullable, readOnly, and writeOnly with OpenAPI's inheritance model.
It would be nice if we could already use x-oas-draft-alternateSchemas to specify other schemas to address some of these issues, until alternativeSchema is available in OpenAPI 3.1 (OAI/OpenAPI-Specification#1736).
OpenAPI lags behind JSON Schema, which means OpenAPI APIs do not benefit from the latest fixes and improvements to the latter.
For example:
patternProperties
is not supported in OpenAPI, even though the latter is based on Draft 5 (Add support for patternProperties in schemas OAI/OpenAPI-Specification#687).additionalProperties: false
is not compatible with OpenAPI's inheritance model usingallOf
[1]. This is blocking for strict validation of JSON request bodies that depend on inheritance (JSON request bodies are not strictly validated #837).nullable
,readOnly
, andwriteOnly
with OpenAPI's inheritance model.It would be nice if we could already use
x-oas-draft-alternateSchemas
to specify other schemas to address some of these issues, untilalternativeSchema
is available in OpenAPI 3.1 (OAI/OpenAPI-Specification#1736).Related issue: Redocly/redoc#482
[1] https://stackoverflow.com/questions/22689900/json-schema-allof-with-additionalproperties
The text was updated successfully, but these errors were encountered: