[Bug] Comparison of additionalProperties should be fixed
allenjzhang opened this issue · comments
... 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.
Change between them should not be flagged.
@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.
For additionalProperties
, true
and {}
are equivalent. I would classify this as a bug fix though I suppose its arguable.
For
additionalProperties
,true
and{}
are equivalent. I would classify this as a bug fix though I suppose its arguable.
Do you have a source for this? Is this something universally true in OpenAPI, or specific to our flavor of OpenAPI?