github.com/djarvur/go-swagger@v0.18.0/examples/generated/restapi/embedded_spec.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 package restapi 4 5 // This file was generated by the swagger tool. 6 // Editing this file might prove futile when you re-run the swagger generate command 7 8 import ( 9 "encoding/json" 10 ) 11 12 var ( 13 // SwaggerJSON embedded version of the swagger document used at generation time 14 SwaggerJSON json.RawMessage 15 // FlatSwaggerJSON embedded flattened version of the swagger document used at generation time 16 FlatSwaggerJSON json.RawMessage 17 ) 18 19 func init() { 20 SwaggerJSON = json.RawMessage([]byte(`{ 21 "schemes": [ 22 "http" 23 ], 24 "swagger": "2.0", 25 "info": { 26 "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\n", 27 "title": "Swagger Petstore", 28 "termsOfService": "http://helloreverb.com/terms/", 29 "contact": { 30 "name": "apiteam@wordnik.com" 31 }, 32 "license": { 33 "name": "Apache 2.0", 34 "url": "http://www.apache.org/licenses/LICENSE-2.0.html" 35 }, 36 "version": "1.0.0" 37 }, 38 "host": "petstore.swagger.wordnik.com", 39 "basePath": "/v2", 40 "paths": { 41 "/pets": { 42 "put": { 43 "security": [ 44 { 45 "petstore_auth": [ 46 "write_pets", 47 "read_pets" 48 ] 49 } 50 ], 51 "consumes": [ 52 "application/json", 53 "application/xml" 54 ], 55 "produces": [ 56 "application/json", 57 "application/xml" 58 ], 59 "tags": [ 60 "pet" 61 ], 62 "summary": "Update an existing pet", 63 "operationId": "updatePet", 64 "parameters": [ 65 { 66 "description": "Pet object that needs to be added to the store", 67 "name": "body", 68 "in": "body", 69 "schema": { 70 "$ref": "#/definitions/Pet" 71 } 72 } 73 ], 74 "responses": { 75 "400": { 76 "description": "Invalid ID supplied" 77 }, 78 "404": { 79 "description": "Pet not found" 80 }, 81 "405": { 82 "description": "Validation exception" 83 } 84 } 85 }, 86 "post": { 87 "security": [ 88 { 89 "petstore_auth": [ 90 "write_pets", 91 "read_pets" 92 ] 93 } 94 ], 95 "consumes": [ 96 "application/json", 97 "application/xml" 98 ], 99 "produces": [ 100 "application/json", 101 "application/xml" 102 ], 103 "tags": [ 104 "pet" 105 ], 106 "summary": "Add a new pet to the store", 107 "operationId": "addPet", 108 "parameters": [ 109 { 110 "description": "Pet object that needs to be added to the store", 111 "name": "body", 112 "in": "body", 113 "schema": { 114 "$ref": "#/definitions/Pet" 115 } 116 } 117 ], 118 "responses": { 119 "405": { 120 "description": "Invalid input" 121 } 122 } 123 } 124 }, 125 "/pets/findByStatus": { 126 "get": { 127 "security": [ 128 { 129 "petstore_auth": [ 130 "write_pets", 131 "read_pets" 132 ] 133 } 134 ], 135 "description": "Multiple status values can be provided with comma seperated strings", 136 "produces": [ 137 "application/json", 138 "application/xml" 139 ], 140 "tags": [ 141 "pet" 142 ], 143 "summary": "Finds Pets by status", 144 "operationId": "findPetsByStatus", 145 "parameters": [ 146 { 147 "type": "array", 148 "items": { 149 "type": "string" 150 }, 151 "collectionFormat": "multi", 152 "description": "Status values that need to be considered for filter", 153 "name": "status", 154 "in": "query" 155 } 156 ], 157 "responses": { 158 "200": { 159 "description": "successful operation", 160 "schema": { 161 "type": "array", 162 "items": { 163 "$ref": "#/definitions/Pet" 164 } 165 } 166 }, 167 "400": { 168 "description": "Invalid status value" 169 } 170 } 171 } 172 }, 173 "/pets/findByTags": { 174 "get": { 175 "security": [ 176 { 177 "petstore_auth": [ 178 "write_pets", 179 "read_pets" 180 ] 181 } 182 ], 183 "description": "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.", 184 "produces": [ 185 "application/json", 186 "application/xml" 187 ], 188 "tags": [ 189 "pet" 190 ], 191 "summary": "Finds Pets by tags", 192 "operationId": "findPetsByTags", 193 "parameters": [ 194 { 195 "type": "array", 196 "items": { 197 "type": "string" 198 }, 199 "collectionFormat": "multi", 200 "description": "Tags to filter by", 201 "name": "tags", 202 "in": "query" 203 } 204 ], 205 "responses": { 206 "200": { 207 "description": "successful operation", 208 "schema": { 209 "type": "array", 210 "items": { 211 "$ref": "#/definitions/Pet" 212 } 213 } 214 }, 215 "400": { 216 "description": "Invalid tag value" 217 } 218 } 219 } 220 }, 221 "/pets/{petId}": { 222 "get": { 223 "security": [ 224 { 225 "api_key": [] 226 }, 227 { 228 "petstore_auth": [ 229 "write_pets", 230 "read_pets" 231 ] 232 } 233 ], 234 "description": "Returns a pet when ID \u003c 10. ID \u003e 10 or nonintegers will simulate API error conditions", 235 "produces": [ 236 "application/json", 237 "application/xml" 238 ], 239 "tags": [ 240 "pet" 241 ], 242 "summary": "Find pet by ID", 243 "operationId": "getPetById", 244 "parameters": [ 245 { 246 "type": "integer", 247 "format": "int64", 248 "description": "ID of pet that needs to be fetched", 249 "name": "petId", 250 "in": "path", 251 "required": true 252 } 253 ], 254 "responses": { 255 "200": { 256 "description": "successful operation", 257 "schema": { 258 "$ref": "#/definitions/Pet" 259 } 260 }, 261 "400": { 262 "description": "Invalid ID supplied" 263 }, 264 "404": { 265 "description": "Pet not found" 266 } 267 } 268 }, 269 "post": { 270 "security": [ 271 { 272 "petstore_auth": [ 273 "write_pets", 274 "read_pets" 275 ] 276 } 277 ], 278 "consumes": [ 279 "application/x-www-form-urlencoded" 280 ], 281 "produces": [ 282 "application/json", 283 "application/xml" 284 ], 285 "tags": [ 286 "pet" 287 ], 288 "summary": "Updates a pet in the store with form data", 289 "operationId": "updatePetWithForm", 290 "parameters": [ 291 { 292 "type": "string", 293 "description": "ID of pet that needs to be updated", 294 "name": "petId", 295 "in": "path", 296 "required": true 297 }, 298 { 299 "type": "string", 300 "description": "Updated name of the pet", 301 "name": "name", 302 "in": "formData", 303 "required": true 304 }, 305 { 306 "type": "string", 307 "description": "Updated status of the pet", 308 "name": "status", 309 "in": "formData", 310 "required": true 311 } 312 ], 313 "responses": { 314 "405": { 315 "description": "Invalid input" 316 } 317 } 318 }, 319 "delete": { 320 "security": [ 321 { 322 "petstore_auth": [ 323 "write_pets", 324 "read_pets" 325 ] 326 } 327 ], 328 "produces": [ 329 "application/json", 330 "application/xml" 331 ], 332 "tags": [ 333 "pet" 334 ], 335 "summary": "Deletes a pet", 336 "operationId": "deletePet", 337 "parameters": [ 338 { 339 "type": "string", 340 "name": "api_key", 341 "in": "header", 342 "required": true 343 }, 344 { 345 "type": "integer", 346 "format": "int64", 347 "description": "Pet id to delete", 348 "name": "petId", 349 "in": "path", 350 "required": true 351 } 352 ], 353 "responses": { 354 "400": { 355 "description": "Invalid pet value" 356 } 357 } 358 } 359 }, 360 "/stores/order": { 361 "post": { 362 "produces": [ 363 "application/json", 364 "application/xml" 365 ], 366 "tags": [ 367 "store" 368 ], 369 "summary": "Place an order for a pet", 370 "operationId": "placeOrder", 371 "parameters": [ 372 { 373 "description": "order placed for purchasing the pet", 374 "name": "body", 375 "in": "body", 376 "schema": { 377 "$ref": "#/definitions/Order" 378 } 379 } 380 ], 381 "responses": { 382 "200": { 383 "description": "successful operation", 384 "schema": { 385 "$ref": "#/definitions/Order" 386 } 387 }, 388 "400": { 389 "description": "Invalid Order" 390 } 391 } 392 } 393 }, 394 "/stores/order/{orderId}": { 395 "get": { 396 "description": "For valid response try integer IDs with value \u003c= 5 or \u003e 10. Other values will generated exceptions", 397 "produces": [ 398 "application/json", 399 "application/xml" 400 ], 401 "tags": [ 402 "store" 403 ], 404 "summary": "Find purchase order by ID", 405 "operationId": "getOrderById", 406 "parameters": [ 407 { 408 "type": "string", 409 "description": "ID of pet that needs to be fetched", 410 "name": "orderId", 411 "in": "path", 412 "required": true 413 } 414 ], 415 "responses": { 416 "200": { 417 "description": "successful operation", 418 "schema": { 419 "$ref": "#/definitions/Order" 420 } 421 }, 422 "400": { 423 "description": "Invalid ID supplied" 424 }, 425 "404": { 426 "description": "Order not found" 427 } 428 } 429 }, 430 "delete": { 431 "description": "For valid response try integer IDs with value \u003c 1000. Anything above 1000 or nonintegers will generate API errors", 432 "produces": [ 433 "application/json", 434 "application/xml" 435 ], 436 "tags": [ 437 "store" 438 ], 439 "summary": "Delete purchase order by ID", 440 "operationId": "deleteOrder", 441 "parameters": [ 442 { 443 "type": "string", 444 "description": "ID of the order that needs to be deleted", 445 "name": "orderId", 446 "in": "path", 447 "required": true 448 } 449 ], 450 "responses": { 451 "400": { 452 "description": "Invalid ID supplied" 453 }, 454 "404": { 455 "description": "Order not found" 456 } 457 } 458 } 459 }, 460 "/users": { 461 "post": { 462 "description": "This can only be done by the logged in user.", 463 "produces": [ 464 "application/json", 465 "application/xml" 466 ], 467 "tags": [ 468 "user" 469 ], 470 "summary": "Create user", 471 "operationId": "createUser", 472 "parameters": [ 473 { 474 "description": "Created user object", 475 "name": "body", 476 "in": "body", 477 "schema": { 478 "$ref": "#/definitions/User" 479 } 480 } 481 ], 482 "responses": { 483 "default": { 484 "description": "successful operation" 485 } 486 } 487 } 488 }, 489 "/users/createWithArray": { 490 "post": { 491 "produces": [ 492 "application/json", 493 "application/xml" 494 ], 495 "tags": [ 496 "user" 497 ], 498 "summary": "Creates list of users with given input array", 499 "operationId": "createUsersWithArrayInput", 500 "parameters": [ 501 { 502 "description": "List of user object", 503 "name": "body", 504 "in": "body", 505 "schema": { 506 "type": "array", 507 "items": { 508 "$ref": "#/definitions/User" 509 } 510 } 511 } 512 ], 513 "responses": { 514 "default": { 515 "description": "successful operation" 516 } 517 } 518 } 519 }, 520 "/users/createWithList": { 521 "post": { 522 "produces": [ 523 "application/json", 524 "application/xml" 525 ], 526 "tags": [ 527 "user" 528 ], 529 "summary": "Creates list of users with given input array", 530 "operationId": "createUsersWithListInput", 531 "parameters": [ 532 { 533 "description": "List of user object", 534 "name": "body", 535 "in": "body", 536 "schema": { 537 "type": "array", 538 "items": { 539 "$ref": "#/definitions/User" 540 } 541 } 542 } 543 ], 544 "responses": { 545 "default": { 546 "description": "successful operation" 547 } 548 } 549 } 550 }, 551 "/users/login": { 552 "get": { 553 "produces": [ 554 "application/json", 555 "application/xml" 556 ], 557 "tags": [ 558 "user" 559 ], 560 "summary": "Logs user into the system", 561 "operationId": "loginUser", 562 "parameters": [ 563 { 564 "type": "string", 565 "description": "The user name for login", 566 "name": "username", 567 "in": "query" 568 }, 569 { 570 "type": "string", 571 "description": "The password for login in clear text", 572 "name": "password", 573 "in": "query" 574 } 575 ], 576 "responses": { 577 "200": { 578 "description": "successful operation", 579 "schema": { 580 "type": "string" 581 } 582 }, 583 "400": { 584 "description": "Invalid username/password supplied" 585 } 586 } 587 } 588 }, 589 "/users/logout": { 590 "get": { 591 "produces": [ 592 "application/json", 593 "application/xml" 594 ], 595 "tags": [ 596 "user" 597 ], 598 "summary": "Logs out current logged in user session", 599 "operationId": "logoutUser", 600 "responses": { 601 "default": { 602 "description": "successful operation" 603 } 604 } 605 } 606 }, 607 "/users/{username}": { 608 "get": { 609 "produces": [ 610 "application/json", 611 "application/xml" 612 ], 613 "tags": [ 614 "user" 615 ], 616 "summary": "Get user by user name", 617 "operationId": "getUserByName", 618 "parameters": [ 619 { 620 "type": "string", 621 "description": "The name that needs to be fetched. Use user1 for testing.", 622 "name": "username", 623 "in": "path", 624 "required": true 625 } 626 ], 627 "responses": { 628 "200": { 629 "description": "successful operation", 630 "schema": { 631 "$ref": "#/definitions/User" 632 } 633 }, 634 "400": { 635 "description": "Invalid username supplied" 636 }, 637 "404": { 638 "description": "User not found" 639 } 640 } 641 }, 642 "put": { 643 "description": "This can only be done by the logged in user.", 644 "produces": [ 645 "application/json", 646 "application/xml" 647 ], 648 "tags": [ 649 "user" 650 ], 651 "summary": "Updated user", 652 "operationId": "updateUser", 653 "parameters": [ 654 { 655 "type": "string", 656 "description": "name that need to be deleted", 657 "name": "username", 658 "in": "path", 659 "required": true 660 }, 661 { 662 "description": "Updated user object", 663 "name": "body", 664 "in": "body", 665 "schema": { 666 "$ref": "#/definitions/User" 667 } 668 } 669 ], 670 "responses": { 671 "400": { 672 "description": "Invalid user supplied" 673 }, 674 "404": { 675 "description": "User not found" 676 } 677 } 678 }, 679 "delete": { 680 "description": "This can only be done by the logged in user.", 681 "produces": [ 682 "application/json", 683 "application/xml" 684 ], 685 "tags": [ 686 "user" 687 ], 688 "summary": "Delete user", 689 "operationId": "deleteUser", 690 "parameters": [ 691 { 692 "type": "string", 693 "description": "The name that needs to be deleted", 694 "name": "username", 695 "in": "path", 696 "required": true 697 } 698 ], 699 "responses": { 700 "400": { 701 "description": "Invalid username supplied" 702 }, 703 "404": { 704 "description": "User not found" 705 } 706 } 707 } 708 } 709 }, 710 "definitions": { 711 "Category": { 712 "properties": { 713 "id": { 714 "type": "integer", 715 "format": "int64" 716 }, 717 "name": { 718 "type": "string" 719 } 720 } 721 }, 722 "Order": { 723 "properties": { 724 "complete": { 725 "type": "boolean" 726 }, 727 "id": { 728 "type": "integer", 729 "format": "int64" 730 }, 731 "petId": { 732 "type": "integer", 733 "format": "int64" 734 }, 735 "quantity": { 736 "type": "integer", 737 "format": "int32" 738 }, 739 "shipDate": { 740 "type": "string", 741 "format": "date-time" 742 }, 743 "status": { 744 "description": "Order Status", 745 "type": "string" 746 } 747 } 748 }, 749 "Pet": { 750 "required": [ 751 "name", 752 "photoUrls" 753 ], 754 "properties": { 755 "category": { 756 "$ref": "#/definitions/Category" 757 }, 758 "id": { 759 "type": "integer", 760 "format": "int64" 761 }, 762 "name": { 763 "type": "string", 764 "example": "doggie" 765 }, 766 "photoUrls": { 767 "type": "array", 768 "items": { 769 "type": "string" 770 } 771 }, 772 "status": { 773 "description": "pet status in the store", 774 "type": "string" 775 }, 776 "tags": { 777 "type": "array", 778 "items": { 779 "$ref": "#/definitions/Tag" 780 } 781 } 782 } 783 }, 784 "Tag": { 785 "properties": { 786 "id": { 787 "type": "integer", 788 "format": "int64" 789 }, 790 "name": { 791 "type": "string" 792 } 793 } 794 }, 795 "User": { 796 "properties": { 797 "email": { 798 "type": "string" 799 }, 800 "firstName": { 801 "type": "string" 802 }, 803 "id": { 804 "type": "integer", 805 "format": "int64" 806 }, 807 "lastName": { 808 "type": "string" 809 }, 810 "password": { 811 "type": "string" 812 }, 813 "phone": { 814 "type": "string" 815 }, 816 "userStatus": { 817 "description": "User Status", 818 "type": "integer", 819 "format": "int32" 820 }, 821 "username": { 822 "type": "string" 823 } 824 } 825 } 826 }, 827 "securityDefinitions": { 828 "api_key": { 829 "type": "apiKey", 830 "name": "api_key", 831 "in": "header" 832 }, 833 "petstore_auth": { 834 "type": "oauth2", 835 "flow": "implicit", 836 "authorizationUrl": "http://petstore.swagger.wordnik.com/api/oauth/dialog", 837 "scopes": { 838 "read_pets": "read your pets", 839 "write_pets": "modify pets in your account" 840 } 841 } 842 } 843 }`)) 844 FlatSwaggerJSON = json.RawMessage([]byte(`{ 845 "schemes": [ 846 "http" 847 ], 848 "swagger": "2.0", 849 "info": { 850 "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\n", 851 "title": "Swagger Petstore", 852 "termsOfService": "http://helloreverb.com/terms/", 853 "contact": { 854 "name": "apiteam@wordnik.com" 855 }, 856 "license": { 857 "name": "Apache 2.0", 858 "url": "http://www.apache.org/licenses/LICENSE-2.0.html" 859 }, 860 "version": "1.0.0" 861 }, 862 "host": "petstore.swagger.wordnik.com", 863 "basePath": "/v2", 864 "paths": { 865 "/pets": { 866 "put": { 867 "security": [ 868 { 869 "petstore_auth": [ 870 "write_pets", 871 "read_pets" 872 ] 873 } 874 ], 875 "consumes": [ 876 "application/json", 877 "application/xml" 878 ], 879 "produces": [ 880 "application/json", 881 "application/xml" 882 ], 883 "tags": [ 884 "pet" 885 ], 886 "summary": "Update an existing pet", 887 "operationId": "updatePet", 888 "parameters": [ 889 { 890 "description": "Pet object that needs to be added to the store", 891 "name": "body", 892 "in": "body", 893 "schema": { 894 "$ref": "#/definitions/Pet" 895 } 896 } 897 ], 898 "responses": { 899 "400": { 900 "description": "Invalid ID supplied" 901 }, 902 "404": { 903 "description": "Pet not found" 904 }, 905 "405": { 906 "description": "Validation exception" 907 } 908 } 909 }, 910 "post": { 911 "security": [ 912 { 913 "petstore_auth": [ 914 "write_pets", 915 "read_pets" 916 ] 917 } 918 ], 919 "consumes": [ 920 "application/json", 921 "application/xml" 922 ], 923 "produces": [ 924 "application/json", 925 "application/xml" 926 ], 927 "tags": [ 928 "pet" 929 ], 930 "summary": "Add a new pet to the store", 931 "operationId": "addPet", 932 "parameters": [ 933 { 934 "description": "Pet object that needs to be added to the store", 935 "name": "body", 936 "in": "body", 937 "schema": { 938 "$ref": "#/definitions/Pet" 939 } 940 } 941 ], 942 "responses": { 943 "405": { 944 "description": "Invalid input" 945 } 946 } 947 } 948 }, 949 "/pets/findByStatus": { 950 "get": { 951 "security": [ 952 { 953 "petstore_auth": [ 954 "write_pets", 955 "read_pets" 956 ] 957 } 958 ], 959 "description": "Multiple status values can be provided with comma seperated strings", 960 "produces": [ 961 "application/json", 962 "application/xml" 963 ], 964 "tags": [ 965 "pet" 966 ], 967 "summary": "Finds Pets by status", 968 "operationId": "findPetsByStatus", 969 "parameters": [ 970 { 971 "type": "array", 972 "items": { 973 "type": "string" 974 }, 975 "collectionFormat": "multi", 976 "description": "Status values that need to be considered for filter", 977 "name": "status", 978 "in": "query" 979 } 980 ], 981 "responses": { 982 "200": { 983 "description": "successful operation", 984 "schema": { 985 "type": "array", 986 "items": { 987 "$ref": "#/definitions/Pet" 988 } 989 } 990 }, 991 "400": { 992 "description": "Invalid status value" 993 } 994 } 995 } 996 }, 997 "/pets/findByTags": { 998 "get": { 999 "security": [ 1000 { 1001 "petstore_auth": [ 1002 "write_pets", 1003 "read_pets" 1004 ] 1005 } 1006 ], 1007 "description": "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.", 1008 "produces": [ 1009 "application/json", 1010 "application/xml" 1011 ], 1012 "tags": [ 1013 "pet" 1014 ], 1015 "summary": "Finds Pets by tags", 1016 "operationId": "findPetsByTags", 1017 "parameters": [ 1018 { 1019 "type": "array", 1020 "items": { 1021 "type": "string" 1022 }, 1023 "collectionFormat": "multi", 1024 "description": "Tags to filter by", 1025 "name": "tags", 1026 "in": "query" 1027 } 1028 ], 1029 "responses": { 1030 "200": { 1031 "description": "successful operation", 1032 "schema": { 1033 "type": "array", 1034 "items": { 1035 "$ref": "#/definitions/Pet" 1036 } 1037 } 1038 }, 1039 "400": { 1040 "description": "Invalid tag value" 1041 } 1042 } 1043 } 1044 }, 1045 "/pets/{petId}": { 1046 "get": { 1047 "security": [ 1048 { 1049 "api_key": [] 1050 }, 1051 { 1052 "petstore_auth": [ 1053 "write_pets", 1054 "read_pets" 1055 ] 1056 } 1057 ], 1058 "description": "Returns a pet when ID \u003c 10. ID \u003e 10 or nonintegers will simulate API error conditions", 1059 "produces": [ 1060 "application/json", 1061 "application/xml" 1062 ], 1063 "tags": [ 1064 "pet" 1065 ], 1066 "summary": "Find pet by ID", 1067 "operationId": "getPetById", 1068 "parameters": [ 1069 { 1070 "type": "integer", 1071 "format": "int64", 1072 "description": "ID of pet that needs to be fetched", 1073 "name": "petId", 1074 "in": "path", 1075 "required": true 1076 } 1077 ], 1078 "responses": { 1079 "200": { 1080 "description": "successful operation", 1081 "schema": { 1082 "$ref": "#/definitions/Pet" 1083 } 1084 }, 1085 "400": { 1086 "description": "Invalid ID supplied" 1087 }, 1088 "404": { 1089 "description": "Pet not found" 1090 } 1091 } 1092 }, 1093 "post": { 1094 "security": [ 1095 { 1096 "petstore_auth": [ 1097 "write_pets", 1098 "read_pets" 1099 ] 1100 } 1101 ], 1102 "consumes": [ 1103 "application/x-www-form-urlencoded" 1104 ], 1105 "produces": [ 1106 "application/json", 1107 "application/xml" 1108 ], 1109 "tags": [ 1110 "pet" 1111 ], 1112 "summary": "Updates a pet in the store with form data", 1113 "operationId": "updatePetWithForm", 1114 "parameters": [ 1115 { 1116 "type": "string", 1117 "description": "ID of pet that needs to be updated", 1118 "name": "petId", 1119 "in": "path", 1120 "required": true 1121 }, 1122 { 1123 "type": "string", 1124 "description": "Updated name of the pet", 1125 "name": "name", 1126 "in": "formData", 1127 "required": true 1128 }, 1129 { 1130 "type": "string", 1131 "description": "Updated status of the pet", 1132 "name": "status", 1133 "in": "formData", 1134 "required": true 1135 } 1136 ], 1137 "responses": { 1138 "405": { 1139 "description": "Invalid input" 1140 } 1141 } 1142 }, 1143 "delete": { 1144 "security": [ 1145 { 1146 "petstore_auth": [ 1147 "write_pets", 1148 "read_pets" 1149 ] 1150 } 1151 ], 1152 "produces": [ 1153 "application/json", 1154 "application/xml" 1155 ], 1156 "tags": [ 1157 "pet" 1158 ], 1159 "summary": "Deletes a pet", 1160 "operationId": "deletePet", 1161 "parameters": [ 1162 { 1163 "type": "string", 1164 "name": "api_key", 1165 "in": "header", 1166 "required": true 1167 }, 1168 { 1169 "type": "integer", 1170 "format": "int64", 1171 "description": "Pet id to delete", 1172 "name": "petId", 1173 "in": "path", 1174 "required": true 1175 } 1176 ], 1177 "responses": { 1178 "400": { 1179 "description": "Invalid pet value" 1180 } 1181 } 1182 } 1183 }, 1184 "/stores/order": { 1185 "post": { 1186 "produces": [ 1187 "application/json", 1188 "application/xml" 1189 ], 1190 "tags": [ 1191 "store" 1192 ], 1193 "summary": "Place an order for a pet", 1194 "operationId": "placeOrder", 1195 "parameters": [ 1196 { 1197 "description": "order placed for purchasing the pet", 1198 "name": "body", 1199 "in": "body", 1200 "schema": { 1201 "$ref": "#/definitions/Order" 1202 } 1203 } 1204 ], 1205 "responses": { 1206 "200": { 1207 "description": "successful operation", 1208 "schema": { 1209 "$ref": "#/definitions/Order" 1210 } 1211 }, 1212 "400": { 1213 "description": "Invalid Order" 1214 } 1215 } 1216 } 1217 }, 1218 "/stores/order/{orderId}": { 1219 "get": { 1220 "description": "For valid response try integer IDs with value \u003c= 5 or \u003e 10. Other values will generated exceptions", 1221 "produces": [ 1222 "application/json", 1223 "application/xml" 1224 ], 1225 "tags": [ 1226 "store" 1227 ], 1228 "summary": "Find purchase order by ID", 1229 "operationId": "getOrderById", 1230 "parameters": [ 1231 { 1232 "type": "string", 1233 "description": "ID of pet that needs to be fetched", 1234 "name": "orderId", 1235 "in": "path", 1236 "required": true 1237 } 1238 ], 1239 "responses": { 1240 "200": { 1241 "description": "successful operation", 1242 "schema": { 1243 "$ref": "#/definitions/Order" 1244 } 1245 }, 1246 "400": { 1247 "description": "Invalid ID supplied" 1248 }, 1249 "404": { 1250 "description": "Order not found" 1251 } 1252 } 1253 }, 1254 "delete": { 1255 "description": "For valid response try integer IDs with value \u003c 1000. Anything above 1000 or nonintegers will generate API errors", 1256 "produces": [ 1257 "application/json", 1258 "application/xml" 1259 ], 1260 "tags": [ 1261 "store" 1262 ], 1263 "summary": "Delete purchase order by ID", 1264 "operationId": "deleteOrder", 1265 "parameters": [ 1266 { 1267 "type": "string", 1268 "description": "ID of the order that needs to be deleted", 1269 "name": "orderId", 1270 "in": "path", 1271 "required": true 1272 } 1273 ], 1274 "responses": { 1275 "400": { 1276 "description": "Invalid ID supplied" 1277 }, 1278 "404": { 1279 "description": "Order not found" 1280 } 1281 } 1282 } 1283 }, 1284 "/users": { 1285 "post": { 1286 "description": "This can only be done by the logged in user.", 1287 "produces": [ 1288 "application/json", 1289 "application/xml" 1290 ], 1291 "tags": [ 1292 "user" 1293 ], 1294 "summary": "Create user", 1295 "operationId": "createUser", 1296 "parameters": [ 1297 { 1298 "description": "Created user object", 1299 "name": "body", 1300 "in": "body", 1301 "schema": { 1302 "$ref": "#/definitions/User" 1303 } 1304 } 1305 ], 1306 "responses": { 1307 "default": { 1308 "description": "successful operation" 1309 } 1310 } 1311 } 1312 }, 1313 "/users/createWithArray": { 1314 "post": { 1315 "produces": [ 1316 "application/json", 1317 "application/xml" 1318 ], 1319 "tags": [ 1320 "user" 1321 ], 1322 "summary": "Creates list of users with given input array", 1323 "operationId": "createUsersWithArrayInput", 1324 "parameters": [ 1325 { 1326 "description": "List of user object", 1327 "name": "body", 1328 "in": "body", 1329 "schema": { 1330 "type": "array", 1331 "items": { 1332 "$ref": "#/definitions/User" 1333 } 1334 } 1335 } 1336 ], 1337 "responses": { 1338 "default": { 1339 "description": "successful operation" 1340 } 1341 } 1342 } 1343 }, 1344 "/users/createWithList": { 1345 "post": { 1346 "produces": [ 1347 "application/json", 1348 "application/xml" 1349 ], 1350 "tags": [ 1351 "user" 1352 ], 1353 "summary": "Creates list of users with given input array", 1354 "operationId": "createUsersWithListInput", 1355 "parameters": [ 1356 { 1357 "description": "List of user object", 1358 "name": "body", 1359 "in": "body", 1360 "schema": { 1361 "type": "array", 1362 "items": { 1363 "$ref": "#/definitions/User" 1364 } 1365 } 1366 } 1367 ], 1368 "responses": { 1369 "default": { 1370 "description": "successful operation" 1371 } 1372 } 1373 } 1374 }, 1375 "/users/login": { 1376 "get": { 1377 "produces": [ 1378 "application/json", 1379 "application/xml" 1380 ], 1381 "tags": [ 1382 "user" 1383 ], 1384 "summary": "Logs user into the system", 1385 "operationId": "loginUser", 1386 "parameters": [ 1387 { 1388 "type": "string", 1389 "description": "The user name for login", 1390 "name": "username", 1391 "in": "query" 1392 }, 1393 { 1394 "type": "string", 1395 "description": "The password for login in clear text", 1396 "name": "password", 1397 "in": "query" 1398 } 1399 ], 1400 "responses": { 1401 "200": { 1402 "description": "successful operation", 1403 "schema": { 1404 "type": "string" 1405 } 1406 }, 1407 "400": { 1408 "description": "Invalid username/password supplied" 1409 } 1410 } 1411 } 1412 }, 1413 "/users/logout": { 1414 "get": { 1415 "produces": [ 1416 "application/json", 1417 "application/xml" 1418 ], 1419 "tags": [ 1420 "user" 1421 ], 1422 "summary": "Logs out current logged in user session", 1423 "operationId": "logoutUser", 1424 "responses": { 1425 "default": { 1426 "description": "successful operation" 1427 } 1428 } 1429 } 1430 }, 1431 "/users/{username}": { 1432 "get": { 1433 "produces": [ 1434 "application/json", 1435 "application/xml" 1436 ], 1437 "tags": [ 1438 "user" 1439 ], 1440 "summary": "Get user by user name", 1441 "operationId": "getUserByName", 1442 "parameters": [ 1443 { 1444 "type": "string", 1445 "description": "The name that needs to be fetched. Use user1 for testing.", 1446 "name": "username", 1447 "in": "path", 1448 "required": true 1449 } 1450 ], 1451 "responses": { 1452 "200": { 1453 "description": "successful operation", 1454 "schema": { 1455 "$ref": "#/definitions/User" 1456 } 1457 }, 1458 "400": { 1459 "description": "Invalid username supplied" 1460 }, 1461 "404": { 1462 "description": "User not found" 1463 } 1464 } 1465 }, 1466 "put": { 1467 "description": "This can only be done by the logged in user.", 1468 "produces": [ 1469 "application/json", 1470 "application/xml" 1471 ], 1472 "tags": [ 1473 "user" 1474 ], 1475 "summary": "Updated user", 1476 "operationId": "updateUser", 1477 "parameters": [ 1478 { 1479 "type": "string", 1480 "description": "name that need to be deleted", 1481 "name": "username", 1482 "in": "path", 1483 "required": true 1484 }, 1485 { 1486 "description": "Updated user object", 1487 "name": "body", 1488 "in": "body", 1489 "schema": { 1490 "$ref": "#/definitions/User" 1491 } 1492 } 1493 ], 1494 "responses": { 1495 "400": { 1496 "description": "Invalid user supplied" 1497 }, 1498 "404": { 1499 "description": "User not found" 1500 } 1501 } 1502 }, 1503 "delete": { 1504 "description": "This can only be done by the logged in user.", 1505 "produces": [ 1506 "application/json", 1507 "application/xml" 1508 ], 1509 "tags": [ 1510 "user" 1511 ], 1512 "summary": "Delete user", 1513 "operationId": "deleteUser", 1514 "parameters": [ 1515 { 1516 "type": "string", 1517 "description": "The name that needs to be deleted", 1518 "name": "username", 1519 "in": "path", 1520 "required": true 1521 } 1522 ], 1523 "responses": { 1524 "400": { 1525 "description": "Invalid username supplied" 1526 }, 1527 "404": { 1528 "description": "User not found" 1529 } 1530 } 1531 } 1532 } 1533 }, 1534 "definitions": { 1535 "Category": { 1536 "properties": { 1537 "id": { 1538 "type": "integer", 1539 "format": "int64" 1540 }, 1541 "name": { 1542 "type": "string" 1543 } 1544 } 1545 }, 1546 "Order": { 1547 "properties": { 1548 "complete": { 1549 "type": "boolean" 1550 }, 1551 "id": { 1552 "type": "integer", 1553 "format": "int64" 1554 }, 1555 "petId": { 1556 "type": "integer", 1557 "format": "int64" 1558 }, 1559 "quantity": { 1560 "type": "integer", 1561 "format": "int32" 1562 }, 1563 "shipDate": { 1564 "type": "string", 1565 "format": "date-time" 1566 }, 1567 "status": { 1568 "description": "Order Status", 1569 "type": "string" 1570 } 1571 } 1572 }, 1573 "Pet": { 1574 "required": [ 1575 "name", 1576 "photoUrls" 1577 ], 1578 "properties": { 1579 "category": { 1580 "$ref": "#/definitions/Category" 1581 }, 1582 "id": { 1583 "type": "integer", 1584 "format": "int64" 1585 }, 1586 "name": { 1587 "type": "string", 1588 "example": "doggie" 1589 }, 1590 "photoUrls": { 1591 "type": "array", 1592 "items": { 1593 "type": "string" 1594 } 1595 }, 1596 "status": { 1597 "description": "pet status in the store", 1598 "type": "string" 1599 }, 1600 "tags": { 1601 "type": "array", 1602 "items": { 1603 "$ref": "#/definitions/Tag" 1604 } 1605 } 1606 } 1607 }, 1608 "Tag": { 1609 "properties": { 1610 "id": { 1611 "type": "integer", 1612 "format": "int64" 1613 }, 1614 "name": { 1615 "type": "string" 1616 } 1617 } 1618 }, 1619 "User": { 1620 "properties": { 1621 "email": { 1622 "type": "string" 1623 }, 1624 "firstName": { 1625 "type": "string" 1626 }, 1627 "id": { 1628 "type": "integer", 1629 "format": "int64" 1630 }, 1631 "lastName": { 1632 "type": "string" 1633 }, 1634 "password": { 1635 "type": "string" 1636 }, 1637 "phone": { 1638 "type": "string" 1639 }, 1640 "userStatus": { 1641 "description": "User Status", 1642 "type": "integer", 1643 "format": "int32" 1644 }, 1645 "username": { 1646 "type": "string" 1647 } 1648 } 1649 } 1650 }, 1651 "securityDefinitions": { 1652 "api_key": { 1653 "type": "apiKey", 1654 "name": "api_key", 1655 "in": "header" 1656 }, 1657 "petstore_auth": { 1658 "type": "oauth2", 1659 "flow": "implicit", 1660 "authorizationUrl": "http://petstore.swagger.wordnik.com/api/oauth/dialog", 1661 "scopes": { 1662 "read_pets": "read your pets", 1663 "write_pets": "modify pets in your account" 1664 } 1665 } 1666 } 1667 }`)) 1668 }