cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/txtar/pattern_with_empty_field.txtar (about) 1 # This tests the case where there's a patternProperties keyword 2 # and no other fields. 3 4 -- schema.json -- 5 { 6 "$schema": "https://json-schema.org/draft/2020-12/schema", 7 "type": "object", 8 "patternProperties": { 9 ".*": { 10 "type": "string" 11 } 12 } 13 } 14 -- out/decode/extract -- 15 @jsonschema(schema="https://json-schema.org/draft/2020-12/schema") 16 {[=~".*"]: string} 17 ... 18 -- test/err-empty-field.json -- 19 {"": true} 20 -- out/decode/testerr/err-empty-field -- 21 "": conflicting values true and string (mismatched types bool and string): 22 generated.cue:2:1 23 generated.cue:2:12 24 test/err-empty-field.json:1:6