cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/txtar/openapi.txtar (about) 1 #version: openapi 2 3 -- schema.yaml -- 4 components: 5 schemas: 6 User: 7 description: "A User uses something." 8 type: object 9 properties: 10 id: 11 type: integer 12 name: 13 type: string 14 address: 15 allOf: [{$ref: "#/components/schemas/PhoneNumber"}] 16 nullable: true 17 PhoneNumber: 18 description: "The number to dial." 19 type: string 20 21 -- out/decode/extract -- 22 // The number to dial. 23 #PhoneNumber: string 24 25 // A User uses something. 26 #User: { 27 id?: int 28 name?: string 29 address?: 30 null | #PhoneNumber 31 ... 32 }