-
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: constraints don't imply types
This was a major bug based on the wrong assumption that a JSON Schema constraint implies the type for that constraint. Instead, the contraints only apply if a value is of a certain type. To keep diffs to a minimum, and to improve the overal output, it now explicitly sorts literal composit types (structs and lists) at the end of a series of conjunctions. Change-Id: Ice98a2bc00ae4a68170cd6cd726565a453b1187f Reviewed-on: https://cue-review.googlesource.com/c/cue/+/6302 Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
- Loading branch information
Showing
16 changed files
with
398 additions
and
157 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ info: { | |
|
||
#Foo: { | ||
a: int | ||
b: >=0 & <10 | ||
b: int & >=0 & <10 | ||
... | ||
} | ||
#Bar: { | ||
|
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.