jsonschema: validate object keywords
Add validation for JSON objects (Go maps). The map keys are called "properties." As with arrays, annotations are needed to support the unevaluatedProperties keyword. Change-Id: Ia01f74300f4bcdbce94065572d83c46dfaa53ae7 Reviewed-on: https://go-review.googlesource.com/c/tools/+/668256 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
bf608eeeae
commit
0def4e0327
1 changed files with 3310 additions and 3 deletions
|
|
@ -53,7 +53,7 @@ func TestValidate(t *testing.T) {
|
|||
t.Run(g.Description, func(t *testing.T) {
|
||||
rs := &ResolvedSchema{root: g.Schema}
|
||||
for s := range g.Schema.all() {
|
||||
if s.Properties != nil || s.Required != nil || s.Defs != nil || s.UnevaluatedProperties != nil {
|
||||
if s.Defs != nil || s.Ref != "" {
|
||||
t.Skip("schema or subschema has unimplemented keywords")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue