Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All 3.0 schemas are being built incorrectly. Or is it me? #4814

Open
mgumerov opened this issue Dec 27, 2024 · 0 comments
Open

All 3.0 schemas are being built incorrectly. Or is it me? #4814

mgumerov opened this issue Dec 27, 2024 · 0 comments

Comments

@mgumerov
Copy link

Hello! It's about additionalProperties. This https://spec.openapis.org/oas/v3.0.1.html#schema-object says Schema in 3.0 is interpreted like described in here: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-00#section-5.18

And that means that any schema not explicitly containing additionalProperties: false allows some additional properties.

Swagger, for its part, never emits additionalProperties: false for my schemas.

Hence, ALL schemas emitted by Swagger imply that additional properties are allowed. Right?!

To make matters worse, this cannot even be overridden via additionalProperties on the class: see #4316 - that works with 3.1 but not 3.0

See also my question here https://stackoverflow.com/questions/79310336/unable-to-disable-additional-properties-with-swagger-schema-3-0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant