Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

JSON Schema and OpenAPI fixes and improvements

Compare
Choose a tag to compare
@mpvl mpvl released this 22 Apr 19:58
· 686 commits to master since this release

This release contains several fixes and enhancements related to CUE conversions.

It fixes several issues with the related to JSON Schema conversion, including an incorrect implementation of the JSON Schema spec. Most notably, one may not infer from a constraint for a certain type that a value must be of that type. This means that if a schema, for instance, defines a properties section, but does not specify the type to an object, the resulting CUE value will be a disjunction from this object and all non-object top-level types. This is not a bug.

Another change is that the cue tool now may silently ignore imprecise conversions, as long as the produced result does not give false negatives. The --strict option will emit the original errors.

Changelog

0059b2b cmd/cue/cmd: allow lossy conversion by default and add --strict option
a38e811 cmd/cue/cmd: fix bug with help flag
b99d364 encoding/jsonschema: add several validators
bcc19ce encoding/jsonschema: encode minItems differently
78e21c1 encoding/jsonschema: fix type exclusion logic
ed4fc4d encoding/jsonschema: wrap comment lines
904f561 encoding/openapi: remove unused code
9b62b36 encoding/protobuf: fix required option parsing
efb89b8 github: fix release.on to push.tags