github.com/apremalal/vamps-core@v1.0.1-0.20161221121535-d430b56ec174/server/webapps/apieditor/spec-files/petstore_full.yaml (about) 1 swagger: "2.0" 2 info: 3 description: | 4 This is a sample server Petstore server. 5 6 [Learn about Swagger](http://swagger.io) or join the IRC channel `#swagger` on irc.freenode.net. 7 8 For this sample, you can use the api key `special-key` to test the authorization filters 9 version: "1.0.0" 10 title: Swagger Petstore 11 termsOfService: http://helloreverb.com/terms/ 12 contact: 13 name: apiteam@swagger.io 14 license: 15 name: Apache 2.0 16 url: http://www.apache.org/licenses/LICENSE-2.0.html 17 host: petstore.swagger.io 18 basePath: /v2 19 schemes: 20 - http 21 paths: 22 /pets: 23 post: 24 tags: 25 - pet 26 summary: Add a new pet to the store 27 description: "" 28 operationId: addPet 29 consumes: 30 - application/json 31 - application/xml 32 produces: 33 - application/json 34 - application/xml 35 parameters: 36 - in: body 37 name: body 38 description: Pet object that needs to be added to the store 39 required: false 40 schema: 41 $ref: "#/definitions/Pet" 42 responses: 43 "405": 44 description: Invalid input 45 security: 46 - petstore_auth: 47 - write_pets 48 - read_pets 49 put: 50 tags: 51 - pet 52 summary: Update an existing pet 53 description: "" 54 operationId: updatePet 55 consumes: 56 - application/json 57 - application/xml 58 produces: 59 - application/json 60 - application/xml 61 parameters: 62 - in: body 63 name: body 64 description: Pet object that needs to be added to the store 65 required: false 66 schema: 67 $ref: "#/definitions/Pet" 68 responses: 69 "405": 70 description: Validation exception 71 "404": 72 description: Pet not found 73 "400": 74 description: Invalid ID supplied 75 security: 76 - petstore_auth: 77 - write_pets 78 - read_pets 79 /pets/findByStatus: 80 get: 81 tags: 82 - pet 83 summary: Finds Pets by status 84 description: Multiple status values can be provided with comma seperated strings 85 operationId: findPetsByStatus 86 produces: 87 - application/json 88 - application/xml 89 parameters: 90 - in: query 91 name: status 92 description: Status values that need to be considered for filter 93 required: false 94 type: array 95 items: 96 type: string 97 collectionFormat: multi 98 responses: 99 "200": 100 description: successful operation 101 schema: 102 type: array 103 items: 104 $ref: "#/definitions/Pet" 105 "400": 106 description: Invalid status value 107 security: 108 - petstore_auth: 109 - write_pets 110 - read_pets 111 /pets/findByTags: 112 get: 113 tags: 114 - pet 115 summary: Finds Pets by tags 116 description: Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing. 117 operationId: findPetsByTags 118 produces: 119 - application/json 120 - application/xml 121 parameters: 122 - in: query 123 name: tags 124 description: Tags to filter by 125 required: false 126 type: array 127 items: 128 type: string 129 collectionFormat: multi 130 responses: 131 "200": 132 description: successful operation 133 schema: 134 type: array 135 items: 136 $ref: "#/definitions/Pet" 137 "400": 138 description: Invalid tag value 139 security: 140 - petstore_auth: 141 - write_pets 142 - read_pets 143 /pets/{petId}: 144 get: 145 tags: 146 - pet 147 summary: Find pet by ID 148 description: Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions 149 operationId: getPetById 150 produces: 151 - application/json 152 - application/xml 153 parameters: 154 - in: path 155 name: petId 156 description: ID of pet that needs to be fetched 157 required: true 158 type: integer 159 format: int64 160 responses: 161 "404": 162 description: Pet not found 163 "200": 164 description: successful operation 165 schema: 166 $ref: "#/definitions/Pet" 167 "400": 168 description: Invalid ID supplied 169 security: 170 - api_key: [] 171 - petstore_auth: 172 - write_pets 173 - read_pets 174 post: 175 tags: 176 - pet 177 summary: Updates a pet in the store with form data 178 description: "" 179 operationId: updatePetWithForm 180 consumes: 181 - application/x-www-form-urlencoded 182 produces: 183 - application/json 184 - application/xml 185 parameters: 186 - in: path 187 name: petId 188 description: ID of pet that needs to be updated 189 required: true 190 type: string 191 - in: formData 192 name: name 193 description: Updated name of the pet 194 required: true 195 type: string 196 - in: formData 197 name: status 198 description: Updated status of the pet 199 required: true 200 type: string 201 responses: 202 "405": 203 description: Invalid input 204 security: 205 - petstore_auth: 206 - write_pets 207 - read_pets 208 delete: 209 tags: 210 - pet 211 summary: Deletes a pet 212 description: "" 213 operationId: deletePet 214 produces: 215 - application/json 216 - application/xml 217 parameters: 218 - in: header 219 name: api_key 220 description: "" 221 required: true 222 type: string 223 - in: path 224 name: petId 225 description: Pet id to delete 226 required: true 227 type: integer 228 format: int64 229 responses: 230 "400": 231 description: Invalid pet value 232 security: 233 - petstore_auth: 234 - write_pets 235 - read_pets 236 /stores/order: 237 post: 238 tags: 239 - store 240 summary: Place an order for a pet 241 description: "" 242 operationId: placeOrder 243 produces: 244 - application/json 245 - application/xml 246 parameters: 247 - in: body 248 name: body 249 description: order placed for purchasing the pet 250 required: false 251 schema: 252 $ref: "#/definitions/Order" 253 responses: 254 "200": 255 description: successful operation 256 schema: 257 $ref: "#/definitions/Order" 258 "400": 259 description: Invalid Order 260 /stores/order/{orderId}: 261 get: 262 tags: 263 - store 264 summary: Find purchase order by ID 265 description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions 266 operationId: getOrderById 267 produces: 268 - application/json 269 - application/xml 270 parameters: 271 - in: path 272 name: orderId 273 description: ID of pet that needs to be fetched 274 required: true 275 type: string 276 responses: 277 "404": 278 description: Order not found 279 "200": 280 description: successful operation 281 schema: 282 $ref: "#/definitions/Order" 283 "400": 284 description: Invalid ID supplied 285 delete: 286 tags: 287 - store 288 summary: Delete purchase order by ID 289 description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors 290 operationId: deleteOrder 291 produces: 292 - application/json 293 - application/xml 294 parameters: 295 - in: path 296 name: orderId 297 description: ID of the order that needs to be deleted 298 required: true 299 type: string 300 responses: 301 "404": 302 description: Order not found 303 "400": 304 description: Invalid ID supplied 305 /users: 306 post: 307 tags: 308 - user 309 summary: Create user 310 description: This can only be done by the logged in user. 311 operationId: createUser 312 produces: 313 - application/json 314 - application/xml 315 parameters: 316 - in: body 317 name: body 318 description: Created user object 319 required: false 320 schema: 321 $ref: "#/definitions/User" 322 responses: 323 default: 324 description: successful operation 325 /users/createWithArray: 326 post: 327 tags: 328 - user 329 summary: Creates list of users with given input array 330 description: "" 331 operationId: createUsersWithArrayInput 332 produces: 333 - application/json 334 - application/xml 335 parameters: 336 - in: body 337 name: body 338 description: List of user object 339 required: false 340 schema: 341 type: array 342 items: 343 $ref: "#/definitions/User" 344 responses: 345 default: 346 description: successful operation 347 /users/createWithList: 348 post: 349 tags: 350 - user 351 summary: Creates list of users with given input array 352 description: "" 353 operationId: createUsersWithListInput 354 produces: 355 - application/json 356 - application/xml 357 parameters: 358 - in: body 359 name: body 360 description: List of user object 361 required: false 362 schema: 363 type: array 364 items: 365 $ref: "#/definitions/User" 366 responses: 367 default: 368 description: successful operation 369 /users/login: 370 get: 371 tags: 372 - user 373 summary: Logs user into the system 374 description: "" 375 operationId: loginUser 376 produces: 377 - application/json 378 - application/xml 379 parameters: 380 - in: query 381 name: username 382 description: The user name for login 383 required: false 384 type: string 385 - in: query 386 name: password 387 description: The password for login in clear text 388 required: false 389 type: string 390 responses: 391 "200": 392 description: successful operation 393 schema: 394 type: string 395 "400": 396 description: Invalid username/password supplied 397 /users/logout: 398 get: 399 tags: 400 - user 401 summary: Logs out current logged in user session 402 description: "" 403 operationId: logoutUser 404 produces: 405 - application/json 406 - application/xml 407 responses: 408 default: 409 description: successful operation 410 /users/{username}: 411 get: 412 tags: 413 - user 414 summary: Get user by user name 415 description: "" 416 operationId: getUserByName 417 produces: 418 - application/json 419 - application/xml 420 parameters: 421 - in: path 422 name: username 423 description: The name that needs to be fetched. Use user1 for testing. 424 required: true 425 type: string 426 responses: 427 "404": 428 description: User not found 429 "200": 430 description: successful operation 431 schema: 432 $ref: "#/definitions/User" 433 "400": 434 description: Invalid username supplied 435 put: 436 tags: 437 - user 438 summary: Updated user 439 description: This can only be done by the logged in user. 440 operationId: updateUser 441 produces: 442 - application/json 443 - application/xml 444 parameters: 445 - in: path 446 name: username 447 description: name that need to be deleted 448 required: true 449 type: string 450 - in: body 451 name: body 452 description: Updated user object 453 required: false 454 schema: 455 $ref: "#/definitions/User" 456 responses: 457 "404": 458 description: User not found 459 "400": 460 description: Invalid user supplied 461 delete: 462 tags: 463 - user 464 summary: Delete user 465 description: This can only be done by the logged in user. 466 operationId: deleteUser 467 produces: 468 - application/json 469 - application/xml 470 parameters: 471 - in: path 472 name: username 473 description: The name that needs to be deleted 474 required: true 475 type: string 476 responses: 477 "404": 478 description: User not found 479 "400": 480 description: Invalid username supplied 481 securityDefinitions: 482 api_key: 483 type: apiKey 484 name: api_key 485 in: header 486 petstore_auth: 487 type: oauth2 488 authorizationUrl: http://petstore.swagger.io/api/oauth/dialog 489 flow: implicit 490 scopes: 491 write_pets: modify pets in your account 492 read_pets: read your pets 493 definitions: 494 User: 495 type: object 496 properties: 497 id: 498 type: integer 499 format: int64 500 username: 501 type: string 502 firstName: 503 type: string 504 lastName: 505 type: string 506 email: 507 type: string 508 password: 509 type: string 510 phone: 511 type: string 512 userStatus: 513 type: integer 514 format: int32 515 description: User Status 516 Category: 517 type: object 518 properties: 519 id: 520 type: integer 521 format: int64 522 name: 523 type: string 524 Pet: 525 type: object 526 required: 527 - name 528 - photoUrls 529 properties: 530 id: 531 type: integer 532 format: int64 533 category: 534 $ref: "#/definitions/Category" 535 name: 536 type: string 537 example: doggie 538 photoUrls: 539 type: array 540 items: 541 type: string 542 tags: 543 type: array 544 items: 545 $ref: "#/definitions/Tag" 546 status: 547 type: string 548 description: pet status in the store 549 Tag: 550 type: object 551 properties: 552 id: 553 type: integer 554 format: int64 555 name: 556 type: string 557 Order: 558 type: object 559 properties: 560 id: 561 type: integer 562 format: int64 563 petId: 564 type: integer 565 format: int64 566 quantity: 567 type: integer 568 format: int32 569 shipDate: 570 type: string 571 format: date-time 572 status: 573 type: string 574 description: Order Status 575 complete: 576 type: boolean