cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/txtar/singleschema_notroot.txtar (about)

     1  #root: #/spec/versions/0/schema/openAPIV3Schema
     2  #singleRoot
     3  
     4  -- schema.yaml --
     5  ---
     6  apiVersion: apiextensions.k8s.io/v1
     7  kind: CustomResourceDefinition
     8  spec:
     9    group: example.io
    10    scope: Namespaced
    11    versions:
    12      - name: v2
    13        schema:
    14          openAPIV3Schema:
    15            description: Something about a CRD.
    16            type: object
    17            properties:
    18              foo:
    19                description: description of foo
    20                type: string
    21              bar:
    22                description: description of bar
    23                allOf:
    24                  - $ref: '#/spec/versions/0/schema/openAPIV3Schema/properties/foo'
    25  -- out/decode/extract --
    26  // Something about a CRD.
    27  // description of foo
    28  foo?: _#defs."/spec/versions/0/schema/openAPIV3Schema/properties/foo"
    29  
    30  // description of bar
    31  bar?: _#defs."/spec/versions/0/schema/openAPIV3Schema/properties/foo"
    32  
    33  // description of foo
    34  _#defs: "/spec/versions/0/schema/openAPIV3Schema/properties/foo": string
    35  ...