cuelang.org/go@v0.13.0/encoding/openapi/testdata/struct.txtar (about) 1 -- in.cue -- 2 import "struct" 3 4 #MyMap: struct.MinFields(4) 5 #MyMap: struct.MaxFields(9) 6 7 #MyType: { 8 map: #MyMap 9 } 10 11 -- out/TestGenerateOpenAPI/out.json -- 12 { 13 "openapi": "3.0.0", 14 "info": { 15 "title": "Generated by cue.", 16 "version": "no version" 17 }, 18 "paths": {}, 19 "components": { 20 "schemas": { 21 "MyMap": { 22 "type": "object", 23 "minProperties": 4, 24 "maxProperties": 9 25 }, 26 "MyType": { 27 "type": "object", 28 "required": [ 29 "map" 30 ], 31 "properties": { 32 "map": { 33 "$ref": "#/components/schemas/MyMap" 34 } 35 } 36 } 37 } 38 } 39 }