cuelang.org/go@v0.13.0/encoding/openapi/testdata/enum.txtar (about) 1 -- in.cue -- 2 #CaptureMode: { 3 "DEFAULT" 4 #enumValue: 0 5 } | { 6 "IPTABLES" 7 #enumValue: 1 8 } | { 9 "NONE" 10 #enumValue: 2 11 } 12 13 -- out/TestGenerateOpenAPI/out.json -- 14 { 15 "openapi": "3.0.0", 16 "info": { 17 "title": "Generated by cue.", 18 "version": "no version" 19 }, 20 "paths": {}, 21 "components": { 22 "schemas": { 23 "CaptureMode": { 24 "type": "string", 25 "enum": [ 26 "DEFAULT", 27 "IPTABLES", 28 "NONE" 29 ] 30 } 31 } 32 } 33 }