Skip to content

[Bug] Comparison of additionalProperties should be fixed #314

Open

Description

... 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.

Activity

  1. mikeharder commented on Mar 28, 2024

    @mikeharder
    Contributor

    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.

  2. mikekistler commented on Mar 28, 2024

    @mikekistler
    Contributor

    For additionalProperties, true and {} are equivalent. I would classify this as a bug fix though I suppose its arguable.

  3. mikeharder commented on Mar 28, 2024

    @mikeharder
    Contributor

    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?

  4. mikekistler commented on Mar 29, 2024

    @mikekistler
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions