-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
encoding/jsonschema: improve handling of $id and $ref
Fixes most issues in Issue #378. Remaining problems are mostly related to invalid JSON schema, if one counts the lack of an $id field as an invalid schema. Used Draft 8 (2019-09) as reference. - Keep stack of $ids - resolve nested $ids and $refs relative to top stack - Fixes several bugs - Allow nested definitions - Allow references to non-definitions Note: - OpenAPI still has its own mechanism. This should be improved at some point to be more unified with JSON schema. Also: - copy metadata in Sanitize Fixes #378. File separate issues for remaining issues. Change-Id: I310d13fe378ff4837c13336d01e0102cb6d49382 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/6142 Reviewed-by: CUE cueckoo <cueckoo@gmail.com> Reviewed-by: Marcel van Lohuizen <mpvl@golang.org> Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
- Loading branch information
Showing
10 changed files
with
645 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.