this repo has no description
at master 85 lines 1.1 kB view raw
1#explicitOpen 2-- test.cue -- 3package test 4t1?: #S1 5t2?: #S2 6t3?: close(_foo) 7t4?: {a?: int, ...} 8t5?: {[_]: int} 9t6?: {a?: int} 10 11#S1: { 12 a?: int 13} 14#S2: { 15 a?: int 16 ... 17} 18_foo: a?: int 19 20-- out/generate-v3/schema -- 21{ 22 $schema: "https://json-schema.org/draft/2020-12/schema" 23 $defs: { 24 "#S1": { 25 type: "object" 26 properties: { 27 a: { 28 type: "integer" 29 } 30 } 31 } 32 "#S2": { 33 type: "object" 34 additionalProperties: true 35 properties: { 36 a: { 37 type: "integer" 38 } 39 } 40 } 41 "_foo": { 42 type: "object" 43 properties: { 44 a: { 45 type: "integer" 46 } 47 } 48 } 49 } 50 type: "object" 51 properties: { 52 t1: { 53 $ref: "#/$defs/%23S1" 54 } 55 t2: { 56 $ref: "#/$defs/%23S2" 57 } 58 t3: { 59 $ref: "#/$defs/_foo" 60 } 61 t4: { 62 type: "object" 63 additionalProperties: true 64 properties: { 65 a: { 66 type: "integer" 67 } 68 } 69 } 70 t5: { 71 type: "object" 72 additionalProperties: { 73 type: "integer" 74 } 75 } 76 t6: { 77 type: "object" 78 properties: { 79 a: { 80 type: "integer" 81 } 82 } 83 } 84 } 85}