-
Notifications
You must be signed in to change notification settings - Fork 11
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
Appropriate use of exclusiveMinimum and exclusiveMaximum #65
Comments
This may be messy. I think OAS 3.0.3 is pinned to an older version of JSON Spec (https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-00). Whereas the latest JSON Spec has the change noted in the issue. Our problem is that we are adapting the API to asyncAPI and that specification pins to a slightly later version of JSON Schema (https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.2.3). Great. |
A related discussion: fastapi/fastapi#240 |
Alright... down the rabbit hole and back out. OAS3.1 would address this issue. Will leave this issue open for any discussion, but likely should be ultimately closed with no action. Other than to potentially open a separate issue requesting upgrade to OAS3.1. I'm not clear on all the implications with that (other than exclusiveMinimum and max will work the same way as in AsyncAPI). |
IIRC, OAS3.1 is an enormous upgrade even if only for the benefit that |
Protocol/utm.yaml
Line 175 in c005a58
OpenAPI 3.0.3 (and I think 3.0.2) defer the definition of the exclusiveMaximum and exclusiveMinimum fields to the JSON schema specification. There (https://json-schema.org/draft/2020-12/json-schema-validation.html#rfc.section.6.2) the definition is:
The current astm-utm yaml uses booleans. I think this is a holdover from OAS 2.0 (https://swagger.io/specification/v2/) that defined them as such.
This issue/task would be to disposition all of the exclusiveMinimum and exclusiveMaximum fields. This may mean removing them, or updating them with a numeric value per JSON Schema specification. Note that if it is the latter, there may be a need to remove or modify any adjacent "minimum"/"maximum" fields.
This change is important for tooling related to code generation and validation of the schema. For example, trying to re-use or reference these schemas from other schemas causes errors due to lack of JSON Schema adherence.
The text was updated successfully, but these errors were encountered: