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
[Bug] Comparison of additionalProperties should be fixed #314
... when comparing additionalProperties: true vs additionalProperties: {}.
additionalProperties: true allows any additional properties of any type. additionalProperties: {} is functionally equivalent to additionalProperties: true, allowing any additional properties without specific schema constraints.
Allen Zhang (@allenjzhang): What is the justification for treating these as equivalent? Can you link to a spec or something that these should be equivalent?
Why are we (or our code generators) switching from true to {}?
Would you say this is really a "bug", or more a "feature request"? Because true and {} are not equivalent in all contexts.
Activity
mikeharder commentedon Mar 28, 2024
Allen Zhang (@allenjzhang): What is the justification for treating these as equivalent? Can you link to a spec or something that these should be equivalent?
Why are we (or our code generators) switching from
trueto{}?Would you say this is really a "bug", or more a "feature request"? Because
trueand{}are not equivalent in all contexts.mikekistler commentedon Mar 28, 2024
For
additionalProperties,trueand{}are equivalent. I would classify this as a bug fix though I suppose its arguable.mikeharder commentedon Mar 28, 2024
Do you have a source for this? Is this something universally true in OpenAPI, or specific to our flavor of OpenAPI?
mikekistler commentedon Mar 29, 2024
https://datatracker.ietf.org/doc/html/draft-fge-json-schema-validation-00#section-5.4.4