github.com/kaisawind/go-swagger@v0.19.0/fixtures/codegen/todolist.enums.flattened.json (about)

     1  {
     2    "consumes": [
     3      "application/json"
     4    ],
     5    "produces": [
     6      "application/json"
     7    ],
     8    "swagger": "2.0",
     9    "info": {
    10      "description": "A very simple api description that makes a json only API to submit to do's.\n",
    11      "title": "Private to-do list",
    12      "version": "1.0.0"
    13    },
    14    "paths": {
    15      "/models": {
    16        "get": {
    17          "description": "Used to see if a codegen can render all the possible enum categories",
    18          "tags": [
    19            "testcgen"
    20          ],
    21          "summary": "many model variations",
    22          "operationId": "modelOp",
    23          "responses": {
    24            "default": {
    25              "description": "Generic Out"
    26            }
    27          }
    28        }
    29      }
    30    },
    31    "definitions": {
    32      "Cluster": {
    33        "description": "The cluster layout.",
    34        "type": "object",
    35        "required": [
    36          "links",
    37          "data"
    38        ],
    39        "properties": {
    40          "data": {
    41            "$ref": "#/definitions/clusterData"
    42          },
    43          "links": {
    44            "$ref": "#/definitions/clusterLinks"
    45          }
    46        }
    47      },
    48      "ComposedThing": {
    49        "type": "object",
    50        "allOf": [
    51          {
    52            "$ref": "#/definitions/StringThing"
    53          },
    54          {
    55            "$ref": "#/definitions/composedThingAllOf1"
    56          }
    57        ]
    58      },
    59      "ComputeInstance": {
    60        "description": "Description of the compute instance",
    61        "type": "object",
    62        "required": [
    63          "id",
    64          "region"
    65        ],
    66        "properties": {
    67          "id": {
    68            "type": "string"
    69          },
    70          "region": {
    71            "type": "string",
    72            "enum": [
    73              "us-west-2",
    74              "us-east-1"
    75            ]
    76          }
    77        }
    78      },
    79      "FloatThing": {
    80        "type": "number",
    81        "format": "float",
    82        "enum": [
    83          21,
    84          28,
    85          35
    86        ]
    87      },
    88      "IntThing": {
    89        "type": "integer",
    90        "format": "int32",
    91        "enum": [
    92          22,
    93          27,
    94          32
    95        ]
    96      },
    97      "Link": {
    98        "type": "string",
    99        "format": "uri"
   100      },
   101      "MapThing": {
   102        "type": "object",
   103        "enum": [
   104          {
   105            "snack": "snickers"
   106          },
   107          {
   108            "snack": "twix"
   109          },
   110          {
   111            "snack": "mars"
   112          }
   113        ],
   114        "additionalProperties": {
   115          "type": "string",
   116          "enum": [
   117            "snickers",
   118            "twix",
   119            "mars"
   120          ]
   121        }
   122      },
   123      "NewPrototype": {
   124        "description": "Description of a new prototype",
   125        "type": "object",
   126        "required": [
   127          "role",
   128          "delegate"
   129        ],
   130        "properties": {
   131          "activating_user": {
   132            "$ref": "#/definitions/newPrototypeActivatingUser"
   133          },
   134          "delegate": {
   135            "$ref": "#/definitions/newPrototypeDelegate"
   136          },
   137          "role": {
   138            "description": "Role that should be applied to the delegate",
   139            "type": "string",
   140            "minLength": 1,
   141            "enum": [
   142              "read",
   143              "write",
   144              "admin"
   145            ]
   146          }
   147        }
   148      },
   149      "ObjectThing": {
   150        "type": "object",
   151        "required": [
   152          "name"
   153        ],
   154        "properties": {
   155          "cats": {
   156            "type": "array",
   157            "items": {
   158              "type": "string",
   159              "enum": [
   160                "four",
   161                "five",
   162                "six"
   163              ]
   164            }
   165          },
   166          "flour": {
   167            "type": "number",
   168            "format": "float",
   169            "enum": [
   170              1,
   171              2,
   172              3
   173            ]
   174          },
   175          "flower": {
   176            "type": "integer",
   177            "format": "int32",
   178            "enum": [
   179              1,
   180              2,
   181              3
   182            ]
   183          },
   184          "lions": {
   185            "$ref": "#/definitions/objectThingLions"
   186          },
   187          "name": {
   188            "type": "string",
   189            "enum": [
   190              "one",
   191              "two",
   192              "three"
   193            ]
   194          },
   195          "wolves": {
   196            "type": "object",
   197            "enum": [
   198              {
   199                "snack": "bambi"
   200              },
   201              {
   202                "snack": "tweetie"
   203              },
   204              {
   205                "snack": "red riding hood"
   206              }
   207            ],
   208            "additionalProperties": {
   209              "type": "string",
   210              "enum": [
   211                "snow white",
   212                "tweetie",
   213                "bambi",
   214                "red riding hood"
   215              ]
   216            }
   217          }
   218        }
   219      },
   220      "SliceAndAdditionalItemsThing": {
   221        "type": "array",
   222        "enum": [
   223          [
   224            "sparrow",
   225            "dove",
   226            "chicken"
   227          ],
   228          [
   229            "cod",
   230            "salmon",
   231            "shark"
   232          ],
   233          [
   234            "monkey",
   235            "tiger",
   236            "elephant"
   237          ]
   238        ],
   239        "items": [
   240          {
   241            "type": "string",
   242            "enum": [
   243              "sparrow",
   244              "dove",
   245              "chicken",
   246              "cod",
   247              "salmon",
   248              "shark",
   249              "monkey",
   250              "tiger",
   251              "elephant"
   252            ]
   253          }
   254        ],
   255        "additionalItems": {
   256          "type": "number",
   257          "format": "float",
   258          "enum": [
   259            43,
   260            44,
   261            45
   262          ]
   263        }
   264      },
   265      "SliceAndItemsThing": {
   266        "type": "array",
   267        "enum": [
   268          [
   269            "sparrow",
   270            "dove",
   271            "chicken"
   272          ],
   273          [
   274            "cod",
   275            "salmon",
   276            "shark"
   277          ],
   278          [
   279            "monkey",
   280            "tiger",
   281            "elephant"
   282          ]
   283        ],
   284        "items": {
   285          "type": "string",
   286          "enum": [
   287            "sparrow",
   288            "dove",
   289            "chicken",
   290            "cod",
   291            "salmon",
   292            "shark",
   293            "monkey",
   294            "tiger",
   295            "elephant"
   296          ]
   297        }
   298      },
   299      "SliceThing": {
   300        "type": "array",
   301        "enum": [
   302          [
   303            "sparrow",
   304            "dove",
   305            "chicken"
   306          ],
   307          [
   308            "cod",
   309            "salmon",
   310            "shark"
   311          ],
   312          [
   313            "monkey",
   314            "tiger",
   315            "elephant"
   316          ]
   317        ],
   318        "items": {
   319          "type": "string"
   320        }
   321      },
   322      "StringThing": {
   323        "type": "string",
   324        "enum": [
   325          "bird",
   326          "fish",
   327          "mammal"
   328        ]
   329      },
   330      "clusterData": {
   331        "type": "object",
   332        "required": [
   333          "status"
   334        ],
   335        "properties": {
   336          "clusterError": {
   337            "description": "Error associated with building or tearingdown the cluster.",
   338            "type": "string"
   339          },
   340          "noOfNodes": {
   341            "description": "Number of nodes the cluster has",
   342            "type": "integer",
   343            "format": "int32"
   344          },
   345          "scheduler": {
   346            "description": "The scheduler that needs to be used by the job scheduler.",
   347            "type": "string"
   348          },
   349          "status": {
   350            "description": "The status of the cluster. It will be one of scheduled, building, up, deleting, exited or error.",
   351            "type": "string",
   352            "default": "scheduled",
   353            "enum": [
   354              "scheduled",
   355              "building",
   356              "up",
   357              "deleting",
   358              "exited",
   359              "error"
   360            ]
   361          }
   362        },
   363        "x-go-gen-location": "models"
   364      },
   365      "clusterLinks": {
   366        "type": "object",
   367        "required": [
   368          "self"
   369        ],
   370        "properties": {
   371          "self": {
   372            "$ref": "#/definitions/Link"
   373          }
   374        },
   375        "x-go-gen-location": "models"
   376      },
   377      "composedThingAllOf1": {
   378        "type": "object",
   379        "required": [
   380          "name"
   381        ],
   382        "properties": {
   383          "name": {
   384            "type": "string",
   385            "enum": [
   386              "one",
   387              "two",
   388              "three"
   389            ]
   390          }
   391        },
   392        "x-go-gen-location": "models"
   393      },
   394      "newPrototypeActivatingUser": {
   395        "description": "Repository creating user to whom the rule should apply",
   396        "type": "object",
   397        "required": [
   398          "name"
   399        ],
   400        "properties": {
   401          "name": {
   402            "description": "The username for the activating_user",
   403            "type": "string"
   404          }
   405        },
   406        "x-go-gen-location": "models"
   407      },
   408      "newPrototypeDelegate": {
   409        "description": "Information about the user or team to which the rule grants access",
   410        "type": "object",
   411        "required": [
   412          "name",
   413          "kind"
   414        ],
   415        "properties": {
   416          "kind": {
   417            "description": "Whether the delegate is a user or a team",
   418            "type": "string",
   419            "enum": [
   420              "user",
   421              "team"
   422            ]
   423          },
   424          "name": {
   425            "description": "The name for the delegate team or user",
   426            "type": "string"
   427          }
   428        },
   429        "x-go-gen-location": "models"
   430      },
   431      "objectThingLions": {
   432        "type": "array",
   433        "items": [
   434          {
   435            "type": "string",
   436            "enum": [
   437              "seven",
   438              "eight",
   439              "nine"
   440            ]
   441          },
   442          {
   443            "type": "integer",
   444            "format": "int64",
   445            "enum": [
   446              4,
   447              5,
   448              6
   449            ]
   450          }
   451        ],
   452        "additionalItems": {
   453          "type": "number",
   454          "format": "double",
   455          "enum": [
   456            7,
   457            8,
   458            9
   459          ]
   460        },
   461        "x-go-gen-location": "models"
   462      },
   463      "slp_action_enum": {
   464        "type": "string",
   465        "enum": [
   466          "slp.action.STOP"
   467        ]
   468      }
   469    }
   470  }