...

Text file src/cuelang.org/go/encoding/openapi/testdata/array.json

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

     1{
     2   "openapi": "3.0.0",
     3   "info": {
     4      "title": "Generated by cue.",
     5      "version": "no version"
     6   },
     7   "paths": {},
     8   "components": {
     9      "schemas": {
    10         "Arrays": {
    11            "type": "object",
    12            "properties": {
    13               "bar": {
    14                  "type": "array",
    15                  "items": {
    16                     "$ref": "#/components/schemas/MyEnum"
    17                  }
    18               },
    19               "foo": {
    20                  "type": "array",
    21                  "items": {
    22                     "$ref": "#/components/schemas/MyStruct"
    23                  }
    24               },
    25               "baz": {
    26                  "type": "array",
    27                  "uniqueItems": true
    28               },
    29               "qux": {
    30                  "type": "array",
    31                  "minItems": 1,
    32                  "maxItems": 3
    33               }
    34            }
    35         },
    36         "MyEnum": {
    37            "description": "MyEnum",
    38            "type": "string",
    39            "enum": [
    40               "1",
    41               "2",
    42               "3"
    43            ],
    44            "default": "1"
    45         },
    46         "MyStruct": {
    47            "description": "MyStruct",
    48            "type": "object",
    49            "properties": {
    50               "a": {
    51                  "type": "integer"
    52               },
    53               "e": {
    54                  "type": "array",
    55                  "items": {
    56                     "$ref": "#/components/schemas/MyEnum"
    57                  }
    58               }
    59            }
    60         }
    61      }
    62   }
    63}

View as plain text