github.com/circl-dev/go-swagger@v0.31.0/examples/generated/swagger.json (about)

     1  {
     2    "consumes": [
     3      "application/json",
     4      "application/x-www-form-urlencoded",
     5      "application/xml"
     6    ],
     7    "produces": [
     8      "application/json",
     9      "application/xml"
    10    ],
    11    "swagger": "2.0",
    12    "info": {
    13      "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel '#swagger' on irc.freenode.net.\n\nFor this sample, you can use the api key 'special-key' to test the authorization filters",
    14      "title": "Swagger Petstore",
    15      "termsOfService": "http://helloreverb.com/terms/\nSchemes:\nhttp",
    16      "contact": {
    17        "email": "apiteam@wordnik.com"
    18      },
    19      "license": {
    20        "name": "Apache 2.0",
    21        "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    22      },
    23      "version": "1.0.0"
    24    },
    25    "host": "petstore.swagger.wordnik.com",
    26    "basePath": "/v2",
    27    "paths": {
    28      "/pets": {
    29        "put": {
    30          "description": "Update an existing pet",
    31          "tags": [
    32            "pet"
    33          ],
    34          "operationId": "updatePet",
    35          "parameters": [
    36            {
    37              "description": "Pet object that needs to be added to the store",
    38              "name": "Body",
    39              "in": "body",
    40              "schema": {
    41                "$ref": "#/definitions/Pet"
    42              }
    43            }
    44          ]
    45        },
    46        "post": {
    47          "description": "Add a new pet to the store",
    48          "tags": [
    49            "pet"
    50          ],
    51          "operationId": "addPet",
    52          "parameters": [
    53            {
    54              "description": "Pet object that needs to be added to the store",
    55              "name": "Body",
    56              "in": "body",
    57              "schema": {
    58                "$ref": "#/definitions/Pet"
    59              }
    60            }
    61          ]
    62        }
    63      },
    64      "/pets/findByStatus": {
    65        "get": {
    66          "description": "Multiple status values can be provided with comma separated strings",
    67          "tags": [
    68            "pet"
    69          ],
    70          "summary": "Finds Pets by status",
    71          "operationId": "findPetsByStatus",
    72          "parameters": [
    73            {
    74              "type": "array",
    75              "items": {
    76                "type": "string"
    77              },
    78              "collectionFormat": "multi",
    79              "description": "Status values that need to be considered for filter",
    80              "name": "Status",
    81              "in": "query"
    82            }
    83          ]
    84        }
    85      },
    86      "/pets/findByTags": {
    87        "get": {
    88          "description": "Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
    89          "tags": [
    90            "pet"
    91          ],
    92          "summary": "Finds Pets by tags",
    93          "operationId": "findPetsByTags",
    94          "parameters": [
    95            {
    96              "type": "array",
    97              "items": {
    98                "type": "string"
    99              },
   100              "collectionFormat": "multi",
   101              "description": "Tags to filter by",
   102              "name": "Tags",
   103              "in": "query"
   104            }
   105          ]
   106        }
   107      },
   108      "/pets/{petId}": {
   109        "get": {
   110          "description": "Returns a pet when ID \u003c 10.  ID \u003e 10 or nonintegers will simulate API error conditions",
   111          "tags": [
   112            "pet"
   113          ],
   114          "summary": "Find pet by ID",
   115          "operationId": "getPetById",
   116          "parameters": [
   117            {
   118              "type": "integer",
   119              "format": "int64",
   120              "description": "ID of pet that needs to be fetched",
   121              "name": "PetID",
   122              "in": "path",
   123              "required": true
   124            }
   125          ]
   126        },
   127        "post": {
   128          "description": "Updates a pet in the store with form data",
   129          "tags": [
   130            "pet"
   131          ],
   132          "operationId": "updatePetWithForm",
   133          "parameters": [
   134            {
   135              "type": "string",
   136              "description": "Updated name of the pet",
   137              "name": "Name",
   138              "in": "formData",
   139              "required": true
   140            },
   141            {
   142              "type": "string",
   143              "description": "ID of pet that needs to be updated",
   144              "name": "PetID",
   145              "in": "path",
   146              "required": true
   147            },
   148            {
   149              "type": "string",
   150              "description": "Updated status of the pet",
   151              "name": "Status",
   152              "in": "formData",
   153              "required": true
   154            }
   155          ]
   156        },
   157        "delete": {
   158          "description": "Deletes a pet",
   159          "tags": [
   160            "pet"
   161          ],
   162          "operationId": "deletePet",
   163          "parameters": [
   164            {
   165              "type": "string",
   166              "name": "APIKey",
   167              "in": "header",
   168              "required": true
   169            },
   170            {
   171              "type": "integer",
   172              "format": "int64",
   173              "description": "Pet id to delete",
   174              "name": "PetID",
   175              "in": "path",
   176              "required": true
   177            }
   178          ]
   179        }
   180      },
   181      "/stores/order": {
   182        "post": {
   183          "description": "Place an order for a pet",
   184          "tags": [
   185            "store"
   186          ],
   187          "operationId": "placeOrder",
   188          "parameters": [
   189            {
   190              "description": "order placed for purchasing the pet",
   191              "name": "Body",
   192              "in": "body",
   193              "schema": {
   194                "$ref": "#/definitions/Order"
   195              }
   196            }
   197          ]
   198        }
   199      },
   200      "/stores/order/{orderId}": {
   201        "get": {
   202          "description": "For valid response try integer IDs with value \u003c= 5 or \u003e 10. Other values will generated exceptions",
   203          "tags": [
   204            "store"
   205          ],
   206          "summary": "Find purchase order by ID",
   207          "operationId": "getOrderById",
   208          "parameters": [
   209            {
   210              "type": "string",
   211              "description": "ID of pet that needs to be fetched",
   212              "name": "OrderID",
   213              "in": "path",
   214              "required": true
   215            }
   216          ]
   217        },
   218        "delete": {
   219          "description": "For valid response try integer IDs with value \u003c 1000. Anything above 1000 or nonintegers will generate API errors",
   220          "tags": [
   221            "store"
   222          ],
   223          "summary": "Delete purchase order by ID",
   224          "operationId": "deleteOrder",
   225          "parameters": [
   226            {
   227              "type": "string",
   228              "description": "ID of the order that needs to be deleted",
   229              "name": "OrderID",
   230              "in": "path",
   231              "required": true
   232            }
   233          ]
   234        }
   235      },
   236      "/users": {
   237        "post": {
   238          "description": "This can only be done by the logged in user.",
   239          "tags": [
   240            "user"
   241          ],
   242          "summary": "Create user",
   243          "operationId": "createUser",
   244          "parameters": [
   245            {
   246              "description": "Created user object",
   247              "name": "Body",
   248              "in": "body",
   249              "schema": {
   250                "$ref": "#/definitions/User"
   251              }
   252            }
   253          ]
   254        }
   255      },
   256      "/users/createWithArray": {
   257        "post": {
   258          "description": "Creates list of users with given input array",
   259          "tags": [
   260            "user"
   261          ],
   262          "operationId": "createUsersWithArrayInput",
   263          "parameters": [
   264            {
   265              "description": "List of user object",
   266              "name": "Body",
   267              "in": "body",
   268              "schema": {
   269                "type": "array",
   270                "items": {
   271                  "$ref": "#/definitions/User"
   272                }
   273              }
   274            }
   275          ]
   276        }
   277      },
   278      "/users/createWithList": {
   279        "post": {
   280          "description": "Creates list of users with given input array",
   281          "tags": [
   282            "user"
   283          ],
   284          "operationId": "createUsersWithListInput",
   285          "parameters": [
   286            {
   287              "description": "List of user object",
   288              "name": "Body",
   289              "in": "body",
   290              "schema": {
   291                "type": "array",
   292                "items": {
   293                  "$ref": "#/definitions/User"
   294                }
   295              }
   296            }
   297          ]
   298        }
   299      },
   300      "/users/login": {
   301        "get": {
   302          "description": "Logs user into the system",
   303          "tags": [
   304            "user"
   305          ],
   306          "operationId": "loginUser",
   307          "parameters": [
   308            {
   309              "type": "string",
   310              "description": "The password for login in clear text",
   311              "name": "Password",
   312              "in": "query"
   313            },
   314            {
   315              "type": "string",
   316              "description": "The user name for login",
   317              "name": "Username",
   318              "in": "query"
   319            }
   320          ]
   321        }
   322      },
   323      "/users/logout": {
   324        "get": {
   325          "description": "Logs out current logged in user session",
   326          "tags": [
   327            "user"
   328          ],
   329          "operationId": "logoutUser"
   330        }
   331      },
   332      "/users/{username}": {
   333        "get": {
   334          "description": "Get user by user name",
   335          "tags": [
   336            "user"
   337          ],
   338          "operationId": "getUserByName",
   339          "parameters": [
   340            {
   341              "type": "string",
   342              "description": "The name that needs to be fetched. Use user1 for testing.",
   343              "name": "Username",
   344              "in": "path",
   345              "required": true
   346            }
   347          ]
   348        },
   349        "put": {
   350          "description": "This can only be done by the logged in user.",
   351          "tags": [
   352            "user"
   353          ],
   354          "summary": "Updated user",
   355          "operationId": "updateUser",
   356          "parameters": [
   357            {
   358              "description": "Updated user object",
   359              "name": "Body",
   360              "in": "body",
   361              "schema": {
   362                "$ref": "#/definitions/User"
   363              }
   364            },
   365            {
   366              "type": "string",
   367              "description": "name that need to be deleted",
   368              "name": "Username",
   369              "in": "path",
   370              "required": true
   371            }
   372          ]
   373        },
   374        "delete": {
   375          "description": "This can only be done by the logged in user.",
   376          "tags": [
   377            "user"
   378          ],
   379          "summary": "Delete user",
   380          "operationId": "deleteUser",
   381          "parameters": [
   382            {
   383              "type": "string",
   384              "description": "The name that needs to be deleted",
   385              "name": "Username",
   386              "in": "path",
   387              "required": true
   388            }
   389          ]
   390        }
   391      }
   392    },
   393    "definitions": {
   394      "Category": {
   395        "description": "Category category",
   396        "type": "object",
   397        "properties": {
   398          "id": {
   399            "description": "id",
   400            "type": "integer",
   401            "format": "int64",
   402            "x-go-name": "ID"
   403          },
   404          "name": {
   405            "description": "name",
   406            "type": "string",
   407            "x-go-name": "Name"
   408          }
   409        },
   410        "x-go-package": "github.com/circl-dev/go-swagger/examples/generated/models"
   411      },
   412      "DateTime": {
   413        "description": "DateTime is a time but it serializes to ISO8601 format with millis\nIt knows how to read 3 different variations of a RFC3339 date time.\nMost APIs we encounter want either millisecond or second precision times.\nThis just tries to make it worry-free.",
   414        "type": "string",
   415        "format": "date-time",
   416        "x-go-package": "github.com/go-openapi/strfmt"
   417      },
   418      "Order": {
   419        "description": "Order order",
   420        "type": "object",
   421        "properties": {
   422          "complete": {
   423            "description": "complete",
   424            "type": "boolean",
   425            "x-go-name": "Complete"
   426          },
   427          "id": {
   428            "description": "id",
   429            "type": "integer",
   430            "format": "int64",
   431            "x-go-name": "ID"
   432          },
   433          "petId": {
   434            "description": "pet Id",
   435            "type": "integer",
   436            "format": "int64",
   437            "x-go-name": "PetID"
   438          },
   439          "quantity": {
   440            "description": "quantity",
   441            "type": "integer",
   442            "format": "int32",
   443            "x-go-name": "Quantity"
   444          },
   445          "shipDate": {
   446            "description": "ship date\nFormat: date-time",
   447            "type": "string",
   448            "format": "date-time",
   449            "x-go-name": "ShipDate"
   450          },
   451          "status": {
   452            "description": "Order Status",
   453            "type": "string",
   454            "x-go-name": "Status"
   455          }
   456        },
   457        "x-go-package": "github.com/circl-dev/go-swagger/examples/generated/models"
   458      },
   459      "Pet": {
   460        "description": "Pet pet",
   461        "type": "object",
   462        "required": [
   463          "name",
   464          "photoUrls"
   465        ],
   466        "properties": {
   467          "category": {
   468            "$ref": "#/definitions/Category"
   469          },
   470          "id": {
   471            "description": "id",
   472            "type": "integer",
   473            "format": "int64",
   474            "x-go-name": "ID"
   475          },
   476          "name": {
   477            "description": "name",
   478            "type": "string",
   479            "x-go-name": "Name"
   480          },
   481          "photoUrls": {
   482            "description": "photo urls",
   483            "type": "array",
   484            "items": {
   485              "type": "string"
   486            },
   487            "x-go-name": "PhotoUrls"
   488          },
   489          "status": {
   490            "description": "pet status in the store",
   491            "type": "string",
   492            "x-go-name": "Status"
   493          },
   494          "tags": {
   495            "description": "tags",
   496            "type": "array",
   497            "items": {
   498              "$ref": "#/definitions/Tag"
   499            },
   500            "x-go-name": "Tags"
   501          }
   502        },
   503        "x-go-package": "github.com/circl-dev/go-swagger/examples/generated/models"
   504      },
   505      "Tag": {
   506        "description": "Tag tag",
   507        "type": "object",
   508        "properties": {
   509          "id": {
   510            "description": "id",
   511            "type": "integer",
   512            "format": "int64",
   513            "x-go-name": "ID"
   514          },
   515          "name": {
   516            "description": "name",
   517            "type": "string",
   518            "x-go-name": "Name"
   519          }
   520        },
   521        "x-go-package": "github.com/circl-dev/go-swagger/examples/generated/models"
   522      },
   523      "User": {
   524        "description": "User user",
   525        "type": "object",
   526        "properties": {
   527          "email": {
   528            "description": "email",
   529            "type": "string",
   530            "x-go-name": "Email"
   531          },
   532          "firstName": {
   533            "description": "first name",
   534            "type": "string",
   535            "x-go-name": "FirstName"
   536          },
   537          "id": {
   538            "description": "id",
   539            "type": "integer",
   540            "format": "int64",
   541            "x-go-name": "ID"
   542          },
   543          "lastName": {
   544            "description": "last name",
   545            "type": "string",
   546            "x-go-name": "LastName"
   547          },
   548          "password": {
   549            "description": "password",
   550            "type": "string",
   551            "x-go-name": "Password"
   552          },
   553          "phone": {
   554            "description": "phone",
   555            "type": "string",
   556            "x-go-name": "Phone"
   557          },
   558          "userStatus": {
   559            "description": "User Status",
   560            "type": "integer",
   561            "format": "int32",
   562            "x-go-name": "UserStatus"
   563          },
   564          "username": {
   565            "description": "username",
   566            "type": "string",
   567            "x-go-name": "Username"
   568          }
   569        },
   570        "x-go-package": "github.com/circl-dev/go-swagger/examples/generated/models"
   571      }
   572    },
   573    "responses": {
   574      "addPetMethodNotAllowed": {
   575        "description": "AddPetMethodNotAllowed Invalid input"
   576      },
   577      "createUserDefault": {
   578        "description": "CreateUserDefault successful operation",
   579        "headers": {
   580          "_statusCode": {
   581            "type": "integer",
   582            "format": "int64"
   583          }
   584        }
   585      },
   586      "createUsersWithArrayInputDefault": {
   587        "description": "CreateUsersWithArrayInputDefault successful operation",
   588        "headers": {
   589          "_statusCode": {
   590            "type": "integer",
   591            "format": "int64"
   592          }
   593        }
   594      },
   595      "createUsersWithListInputDefault": {
   596        "description": "CreateUsersWithListInputDefault successful operation",
   597        "headers": {
   598          "_statusCode": {
   599            "type": "integer",
   600            "format": "int64"
   601          }
   602        }
   603      },
   604      "deleteOrderBadRequest": {
   605        "description": "DeleteOrderBadRequest Invalid ID supplied"
   606      },
   607      "deleteOrderNotFound": {
   608        "description": "DeleteOrderNotFound Order not found"
   609      },
   610      "deletePetBadRequest": {
   611        "description": "DeletePetBadRequest Invalid pet value"
   612      },
   613      "deleteUserBadRequest": {
   614        "description": "DeleteUserBadRequest Invalid username supplied"
   615      },
   616      "deleteUserNotFound": {
   617        "description": "DeleteUserNotFound User not found"
   618      },
   619      "findPetsByStatusBadRequest": {
   620        "description": "FindPetsByStatusBadRequest Invalid status value"
   621      },
   622      "findPetsByStatusOK": {
   623        "description": "FindPetsByStatusOK successful operation",
   624        "headers": {
   625          "body": {
   626            "type": "array",
   627            "items": {
   628              "$ref": "#/definitions/Pet"
   629            },
   630            "description": "In: Body"
   631          }
   632        }
   633      },
   634      "findPetsByTagsBadRequest": {
   635        "description": "FindPetsByTagsBadRequest Invalid tag value"
   636      },
   637      "findPetsByTagsOK": {
   638        "description": "FindPetsByTagsOK successful operation",
   639        "headers": {
   640          "body": {
   641            "type": "array",
   642            "items": {
   643              "$ref": "#/definitions/Pet"
   644            },
   645            "description": "In: Body"
   646          }
   647        }
   648      },
   649      "getOrderByIdBadRequest": {
   650        "description": "GetOrderByIDBadRequest Invalid ID supplied"
   651      },
   652      "getOrderByIdNotFound": {
   653        "description": "GetOrderByIDNotFound Order not found"
   654      },
   655      "getOrderByIdOK": {
   656        "description": "GetOrderByIDOK successful operation",
   657        "schema": {
   658          "$ref": "#/definitions/Order"
   659        },
   660        "headers": {
   661          "body": {
   662            "description": "In: Body"
   663          }
   664        }
   665      },
   666      "getPetByIdBadRequest": {
   667        "description": "GetPetByIDBadRequest Invalid ID supplied"
   668      },
   669      "getPetByIdNotFound": {
   670        "description": "GetPetByIDNotFound Pet not found"
   671      },
   672      "getPetByIdOK": {
   673        "description": "GetPetByIDOK successful operation",
   674        "schema": {
   675          "$ref": "#/definitions/Pet"
   676        },
   677        "headers": {
   678          "body": {
   679            "description": "In: Body"
   680          }
   681        }
   682      },
   683      "getUserByNameBadRequest": {
   684        "description": "GetUserByNameBadRequest Invalid username supplied"
   685      },
   686      "getUserByNameNotFound": {
   687        "description": "GetUserByNameNotFound User not found"
   688      },
   689      "getUserByNameOK": {
   690        "description": "GetUserByNameOK successful operation",
   691        "schema": {
   692          "$ref": "#/definitions/User"
   693        },
   694        "headers": {
   695          "body": {
   696            "description": "In: Body"
   697          }
   698        }
   699      },
   700      "loginUserBadRequest": {
   701        "description": "LoginUserBadRequest Invalid username/password supplied"
   702      },
   703      "loginUserOK": {
   704        "description": "LoginUserOK successful operation",
   705        "headers": {
   706          "body": {
   707            "type": "string",
   708            "description": "In: Body"
   709          }
   710        }
   711      },
   712      "logoutUserDefault": {
   713        "description": "LogoutUserDefault successful operation",
   714        "headers": {
   715          "_statusCode": {
   716            "type": "integer",
   717            "format": "int64"
   718          }
   719        }
   720      },
   721      "placeOrderBadRequest": {
   722        "description": "PlaceOrderBadRequest Invalid Order"
   723      },
   724      "placeOrderOK": {
   725        "description": "PlaceOrderOK successful operation",
   726        "schema": {
   727          "$ref": "#/definitions/Order"
   728        },
   729        "headers": {
   730          "body": {
   731            "description": "In: Body"
   732          }
   733        }
   734      },
   735      "updatePetBadRequest": {
   736        "description": "UpdatePetBadRequest Invalid ID supplied"
   737      },
   738      "updatePetMethodNotAllowed": {
   739        "description": "UpdatePetMethodNotAllowed Validation exception"
   740      },
   741      "updatePetNotFound": {
   742        "description": "UpdatePetNotFound Pet not found"
   743      },
   744      "updatePetWithFormMethodNotAllowed": {
   745        "description": "UpdatePetWithFormMethodNotAllowed Invalid input"
   746      },
   747      "updateUserBadRequest": {
   748        "description": "UpdateUserBadRequest Invalid user supplied"
   749      },
   750      "updateUserNotFound": {
   751        "description": "UpdateUserNotFound User not found"
   752      }
   753    }
   754  }