cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/txtar/k8s_ref.txtar (about) 1 By contrast with CRDs, the Kubernetes API does allow $ref. 2 Use the same example as crd_ref.txtar for comparison. 3 4 #version: k8sAPI 5 #root: #/spec/versions/0/schema/openAPIV3Schema 6 #singleRoot 7 8 -- schema.yaml -- 9 apiVersion: apiextensions.k8s.io/v1 10 kind: CustomResourceDefinition 11 metadata: 12 # name must be in the form: <plural>.<group> 13 name: myapps.example.com 14 x-other: 15 type: string 16 spec: 17 # group name to use for REST API: /apis/<group>/<version> 18 group: example.com 19 scope: Namespaced 20 names: 21 # kind is normally the CamelCased singular type. 22 kind: MyApp 23 # singular name to be used as an alias on the CLI 24 singular: myapp 25 # plural name in the URL: /apis/<group>/<version>/<plural> 26 plural: myapps 27 versions: 28 - name: v1 29 served: true 30 storage: true 31 schema: 32 openAPIV3Schema: 33 type: object 34 properties: 35 spec: 36 $ref: "#/x-other" 37 foo: 38 type: string 39 40 -- out/decode/extract -- 41 spec?: _#defs."/x-other" 42 foo?: string 43 44 _#defs: "/x-other": string