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

Allow additionalProperties to take Boolean values #49

Merged

Conversation

pluehne
Copy link
Contributor

@pluehne pluehne commented Jan 17, 2021

The OpenAPI specification defines the additionalProperties field according to the JSON schema specification. In the version of the JSON schema specification referenced by the OpenAPI specification, the value of additionalProperties may be either Boolean or a schema (though it appears that newer versions of the JSON schema specification no longer allow Boolean values).

However, to comply with OpenAPI 3.0, this adjusts the representation of the additionalProperties field in this crate accordingly

The OpenAPI specification defines the additionalProperties field
according to the JSON schema specification. In the version of the JSON
schema specification referenced by the OpenAPI specification [1], the
value of additionalProperties may be either Boolean or a schema (though
it appears that newer versions of the JSON schema specification [2] no
longer allow Boolean values).

However, to comply with OpenAPI 3.0, this adjusts the representation of
the additionalProperties field in this crate accordingly

[1] https://tools.ietf.org/html/draft-wright-json-schema-validation-00#section-5.18
[2] https://json-schema.org/draft/2019-09/json-schema-core.html#additionalProperties
@softprops softprops merged commit 646c15e into softprops:master Jan 17, 2021
@pluehne pluehne deleted the allow-booleans-for-additionalproperties branch January 18, 2021 00:38
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

Successfully merging this pull request may close these issues.

None yet

2 participants