-
Notifications
You must be signed in to change notification settings - Fork 171
OpenAPI: exclusiveMinimum/Maximum #412
Comments
I guess it depends on the version of JSON Schema you consider. CUE interprets it to the current standard. Is there any particular JSON Schema version that is required for OpenAPI? |
I didn't know there was a divergence between the JSON schema and OpenAPI. OAPI Issue 1977
|
Yeah, not the easiest thing to manage, with both CUE, OpenAPI and JSON Schema being moving targets. We're working at least to get CUE to a backwards compatibility guarantee, modulo backwards incompatible changes imposed by OpenAPI/JSON Schema. Note there is also somewhat of a divergence between OpenAPI for CRDs versus more general OpenAPI standards. I guess the issue is that this is not working for v3.0.0, which accepts only booleans. It seems reasonable to support this, weren't it for the fact hat OpenAPI and JSON Schema themselves are fairly fast-moving targets. How much could people live with only supporting v3.1.0? |
I think CUE can be very useful if it knows all the inconsistencies of the other formats. However, it makes sense to wait for version 3.1.0 if all problems are automatically fixed. |
I've changed the behavior to generate bool for OpenAPI. I've added a version option in the config and changed it such that it will start printing numbers again for v3.1.0. See https://cue-review.googlesource.com/c/cue/+/6361 This also adds reading support in jsonschema for this legacy encoding. |
This issue has been migrated to cue-lang/cue#412. For more details about CUE's migration to a new home, please see cue-lang/cue#1078. |
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest release?
yes
What did you do?
What did you expect to see?
What did you see instead?
I copied this code into the Swagger Editor and received this error:
The text was updated successfully, but these errors were encountered: