...

Text file src/cuelang.org/go/encoding/jsonschema/testdata/openapi.txtar

Documentation: cuelang.org/go/encoding/jsonschema/testdata

     1openapi
     2
     3-- type.yaml --
     4components:
     5  schemas:
     6    User:
     7      description: "A User uses something."
     8      type: object
     9      properties:
    10        id:
    11          type: integer
    12        name:
    13          type: string
    14        address:
    15          $ref: "#/components/schemas/PhoneNumber"
    16          nullable: true
    17    PhoneNumber:
    18      description: "The number to dial."
    19      type: string
    20
    21-- out.cue --
    22// A User uses something.
    23#User: {
    24	id?:   int
    25	name?: string
    26	address?:
    27		null | #PhoneNumber
    28	...
    29}
    30
    31// The number to dial.
    32#PhoneNumber: string

View as plain text