cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/txtar/k8s_group_kind_version.txtar (about) 1 Note: the schema.json file here has components 2 derived from the api/openapi-spec/v3 directory 3 the Kubernetes repository. 4 5 #version: k8sAPI 6 7 -- schema.json -- 8 { 9 "components": { 10 "schemas": { 11 "io.k8s.api.apps.v1.Deployment": { 12 "properties": { 13 "apiVersion": { 14 "type": "string" 15 }, 16 "kind": { 17 "type": "string" 18 } 19 }, 20 "type": "object", 21 "x-kubernetes-group-version-kind": [ 22 { 23 "group": "apps", 24 "kind": "Deployment", 25 "version": "v1" 26 } 27 ] 28 }, 29 "io.k8s.apimachinery.pkg.apis.meta.v1.APIVersions": { 30 "properties": { 31 "apiVersion": { 32 "type": "string" 33 }, 34 "kind": { 35 "type": "string" 36 }, 37 "serverAddressByClientCIDRs": { 38 "items": { 39 "allOf": [ 40 { 41 "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR" 42 } 43 ], 44 "default": {} 45 }, 46 "type": "array", 47 "x-kubernetes-list-type": "atomic" 48 }, 49 "versions": { 50 "items": { 51 "default": "", 52 "type": "string" 53 }, 54 "type": "array", 55 "x-kubernetes-list-type": "atomic" 56 } 57 }, 58 "required": [ 59 "versions", 60 "serverAddressByClientCIDRs" 61 ], 62 "type": "object", 63 "x-kubernetes-group-version-kind": [ 64 { 65 "group": "", 66 "kind": "APIVersions", 67 "version": "v1" 68 } 69 ] 70 }, 71 "io.k8s.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR": { 72 "properties": { 73 "clientCIDR": { 74 "default": "", 75 "type": "string" 76 }, 77 "serverAddress": { 78 "default": "", 79 "type": "string" 80 } 81 }, 82 "required": [ 83 "clientCIDR", 84 "serverAddress" 85 ], 86 "type": "object" 87 } 88 }, 89 "securitySchemes": { 90 "BearerToken": { 91 "in": "header", 92 "name": "authorization", 93 "type": "apiKey" 94 } 95 } 96 }, 97 "info": { 98 "title": "Kubernetes", 99 "version": "unversioned" 100 }, 101 "openapi": "3.0.0", 102 "paths": {} 103 } 104 -- out/decode/extract -- 105 _#defs: "/components/schemas/io.k8s.api.apps.v1.Deployment": { 106 apiVersion: "apps/v1" 107 kind: "Deployment" 108 } 109 110 _#defs: "/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIVersions": { 111 apiVersion: "v1" 112 kind: "APIVersions" 113 serverAddressByClientCIDRs!: [..._#defs."/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR"] 114 versions!: [...string] 115 } 116 117 _#defs: "/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR": { 118 clientCIDR!: string 119 serverAddress!: string 120 }