github.com/Axway/agent-sdk@v1.1.101/pkg/apic/testdata/petstore-swagger-bad-version.json (about) 1 { 2 "swagger": "1.0", 3 "info": { 4 "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", 5 "version": "1.0.3", 6 "title": "Swagger Petstore", 7 "termsOfService": "http://swagger.io/terms/", 8 "contact": { 9 "email": "apiteam@swagger.io" 10 }, 11 "license": { 12 "name": "Apache 2.0", 13 "url": "http://www.apache.org/licenses/LICENSE-2.0.html" 14 } 15 }, 16 "host": "petstore.swagger.io", 17 "basePath": "/v2", 18 "tags": [ 19 { 20 "name": "pet", 21 "description": "Everything about your Pets", 22 "externalDocs": { 23 "description": "Find out more", 24 "url": "http://swagger.io" 25 } 26 }, 27 { 28 "name": "store", 29 "description": "Access to Petstore orders" 30 }, 31 { 32 "name": "user", 33 "description": "Operations about user", 34 "externalDocs": { 35 "description": "Find out more about our store", 36 "url": "http://swagger.io" 37 } 38 } 39 ], 40 "schemes": [ 41 "https" 42 ], 43 "paths": { 44 "/pet/{petId}": { 45 "get": { 46 "tags": [ 47 "pet" 48 ], 49 "summary": "Find pet by ID", 50 "description": "Returns a single pet", 51 "operationId": "getPetById", 52 "produces": [ 53 "application/json", 54 "application/xml" 55 ], 56 "parameters": [ 57 { 58 "name": "petId", 59 "in": "path", 60 "description": "ID of pet to return", 61 "required": true, 62 "type": "integer", 63 "format": "int64" 64 } 65 ], 66 "responses": { 67 "200": { 68 "description": "successful operation", 69 "schema": { 70 "$ref": "#/definitions/Pet" 71 } 72 }, 73 "400": { 74 "description": "Invalid ID supplied" 75 }, 76 "404": { 77 "description": "Pet not found" 78 } 79 }, 80 "security": [ 81 { 82 "api_key": [] 83 } 84 ] 85 }, 86 "post": { 87 "tags": [ 88 "pet" 89 ], 90 "summary": "Updates a pet in the store with form data", 91 "description": "", 92 "operationId": "updatePetWithForm", 93 "consumes": [ 94 "application/x-www-form-urlencoded" 95 ], 96 "produces": [ 97 "application/json", 98 "application/xml" 99 ], 100 "parameters": [ 101 { 102 "name": "petId", 103 "in": "path", 104 "description": "ID of pet that needs to be updated", 105 "required": true, 106 "type": "integer", 107 "format": "int64" 108 }, 109 { 110 "name": "name", 111 "in": "formData", 112 "description": "Updated name of the pet", 113 "required": false, 114 "type": "string" 115 }, 116 { 117 "name": "status", 118 "in": "formData", 119 "description": "Updated status of the pet", 120 "required": false, 121 "type": "string" 122 } 123 ], 124 "responses": { 125 "405": { 126 "description": "Invalid input" 127 } 128 }, 129 "security": [ 130 { 131 "petstore_auth": [ 132 "write:pets", 133 "read:pets" 134 ] 135 } 136 ] 137 }, 138 "delete": { 139 "tags": [ 140 "pet" 141 ], 142 "summary": "Deletes a pet", 143 "description": "", 144 "operationId": "deletePet", 145 "produces": [ 146 "application/json", 147 "application/xml" 148 ], 149 "parameters": [ 150 { 151 "name": "api_key", 152 "in": "header", 153 "required": false, 154 "type": "string" 155 }, 156 { 157 "name": "petId", 158 "in": "path", 159 "description": "Pet id to delete", 160 "required": true, 161 "type": "integer", 162 "format": "int64" 163 } 164 ], 165 "responses": { 166 "400": { 167 "description": "Invalid ID supplied" 168 }, 169 "404": { 170 "description": "Pet not found" 171 } 172 }, 173 "security": [ 174 { 175 "petstore_auth": [ 176 "write:pets", 177 "read:pets" 178 ] 179 } 180 ] 181 } 182 }, 183 "/pet/{petId}/uploadImage": { 184 "post": { 185 "tags": [ 186 "pet" 187 ], 188 "summary": "uploads an image", 189 "description": "", 190 "operationId": "uploadFile", 191 "consumes": [ 192 "multipart/form-data" 193 ], 194 "produces": [ 195 "application/json" 196 ], 197 "parameters": [ 198 { 199 "name": "petId", 200 "in": "path", 201 "description": "ID of pet to update", 202 "required": true, 203 "type": "integer", 204 "format": "int64" 205 }, 206 { 207 "name": "additionalMetadata", 208 "in": "formData", 209 "description": "Additional data to pass to server", 210 "required": false, 211 "type": "string" 212 }, 213 { 214 "name": "file", 215 "in": "formData", 216 "description": "file to upload", 217 "required": false, 218 "type": "file" 219 } 220 ], 221 "responses": { 222 "200": { 223 "description": "successful operation", 224 "schema": { 225 "$ref": "#/definitions/ApiResponse" 226 } 227 } 228 }, 229 "security": [ 230 { 231 "petstore_auth": [ 232 "write:pets", 233 "read:pets" 234 ] 235 } 236 ] 237 } 238 }, 239 "/pet": { 240 "post": { 241 "tags": [ 242 "pet" 243 ], 244 "summary": "Add a new pet to the store", 245 "description": "", 246 "operationId": "addPet", 247 "consumes": [ 248 "application/json", 249 "application/xml" 250 ], 251 "produces": [ 252 "application/json", 253 "application/xml" 254 ], 255 "parameters": [ 256 { 257 "in": "body", 258 "name": "body", 259 "description": "Pet object that needs to be added to the store", 260 "required": true, 261 "schema": { 262 "$ref": "#/definitions/Pet" 263 } 264 } 265 ], 266 "responses": { 267 "405": { 268 "description": "Invalid input" 269 } 270 }, 271 "security": [ 272 { 273 "petstore_auth": [ 274 "write:pets", 275 "read:pets" 276 ] 277 } 278 ] 279 }, 280 "put": { 281 "tags": [ 282 "pet" 283 ], 284 "summary": "Update an existing pet", 285 "description": "", 286 "operationId": "updatePet", 287 "consumes": [ 288 "application/json", 289 "application/xml" 290 ], 291 "produces": [ 292 "application/json", 293 "application/xml" 294 ], 295 "parameters": [ 296 { 297 "in": "body", 298 "name": "body", 299 "description": "Pet object that needs to be added to the store", 300 "required": true, 301 "schema": { 302 "$ref": "#/definitions/Pet" 303 } 304 } 305 ], 306 "responses": { 307 "400": { 308 "description": "Invalid ID supplied" 309 }, 310 "404": { 311 "description": "Pet not found" 312 }, 313 "405": { 314 "description": "Validation exception" 315 } 316 }, 317 "security": [ 318 { 319 "petstore_auth": [ 320 "write:pets", 321 "read:pets" 322 ] 323 } 324 ] 325 } 326 }, 327 "/pet/findByStatus": { 328 "get": { 329 "tags": [ 330 "pet" 331 ], 332 "summary": "Finds Pets by status", 333 "description": "Multiple status values can be provided with comma separated strings", 334 "operationId": "findPetsByStatus", 335 "produces": [ 336 "application/json", 337 "application/xml" 338 ], 339 "parameters": [ 340 { 341 "name": "status", 342 "in": "query", 343 "description": "Status values that need to be considered for filter", 344 "required": true, 345 "type": "array", 346 "items": { 347 "type": "string", 348 "enum": [ 349 "available", 350 "pending", 351 "sold" 352 ], 353 "default": "available" 354 }, 355 "collectionFormat": "multi" 356 } 357 ], 358 "responses": { 359 "200": { 360 "description": "successful operation", 361 "schema": { 362 "type": "array", 363 "items": { 364 "$ref": "#/definitions/Pet" 365 } 366 } 367 }, 368 "400": { 369 "description": "Invalid status value" 370 } 371 }, 372 "security": [ 373 { 374 "petstore_auth": [ 375 "write:pets", 376 "read:pets" 377 ] 378 } 379 ] 380 } 381 }, 382 "/pet/findByTags": { 383 "get": { 384 "tags": [ 385 "pet" 386 ], 387 "summary": "Finds Pets by tags", 388 "description": "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", 389 "operationId": "findPetsByTags", 390 "produces": [ 391 "application/json", 392 "application/xml" 393 ], 394 "parameters": [ 395 { 396 "name": "tags", 397 "in": "query", 398 "description": "Tags to filter by", 399 "required": true, 400 "type": "array", 401 "items": { 402 "type": "string" 403 }, 404 "collectionFormat": "multi" 405 } 406 ], 407 "responses": { 408 "200": { 409 "description": "successful operation", 410 "schema": { 411 "type": "array", 412 "items": { 413 "$ref": "#/definitions/Pet" 414 } 415 } 416 }, 417 "400": { 418 "description": "Invalid tag value" 419 } 420 }, 421 "security": [ 422 { 423 "petstore_auth": [ 424 "write:pets", 425 "read:pets" 426 ] 427 } 428 ], 429 "deprecated": true 430 } 431 }, 432 "/store/inventory": { 433 "get": { 434 "tags": [ 435 "store" 436 ], 437 "summary": "Returns pet inventories by status", 438 "description": "Returns a map of status codes to quantities", 439 "operationId": "getInventory", 440 "produces": [ 441 "application/json" 442 ], 443 "parameters": [], 444 "responses": { 445 "200": { 446 "description": "successful operation", 447 "schema": { 448 "type": "object", 449 "additionalProperties": { 450 "type": "integer", 451 "format": "int32" 452 } 453 } 454 } 455 }, 456 "security": [ 457 { 458 "api_key": [] 459 } 460 ] 461 } 462 }, 463 "/store/order/{orderId}": { 464 "get": { 465 "tags": [ 466 "store" 467 ], 468 "summary": "Find purchase order by ID", 469 "description": "For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions", 470 "operationId": "getOrderById", 471 "produces": [ 472 "application/json", 473 "application/xml" 474 ], 475 "parameters": [ 476 { 477 "name": "orderId", 478 "in": "path", 479 "description": "ID of pet that needs to be fetched", 480 "required": true, 481 "type": "integer", 482 "maximum": 10, 483 "minimum": 1, 484 "format": "int64" 485 } 486 ], 487 "responses": { 488 "200": { 489 "description": "successful operation", 490 "schema": { 491 "$ref": "#/definitions/Order" 492 } 493 }, 494 "400": { 495 "description": "Invalid ID supplied" 496 }, 497 "404": { 498 "description": "Order not found" 499 } 500 } 501 }, 502 "delete": { 503 "tags": [ 504 "store" 505 ], 506 "summary": "Delete purchase order by ID", 507 "description": "For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors", 508 "operationId": "deleteOrder", 509 "produces": [ 510 "application/json", 511 "application/xml" 512 ], 513 "parameters": [ 514 { 515 "name": "orderId", 516 "in": "path", 517 "description": "ID of the order that needs to be deleted", 518 "required": true, 519 "type": "integer", 520 "minimum": 1, 521 "format": "int64" 522 } 523 ], 524 "responses": { 525 "400": { 526 "description": "Invalid ID supplied" 527 }, 528 "404": { 529 "description": "Order not found" 530 } 531 } 532 } 533 }, 534 "/store/order": { 535 "post": { 536 "tags": [ 537 "store" 538 ], 539 "summary": "Place an order for a pet", 540 "description": "", 541 "operationId": "placeOrder", 542 "consumes": [ 543 "application/json" 544 ], 545 "produces": [ 546 "application/json", 547 "application/xml" 548 ], 549 "parameters": [ 550 { 551 "in": "body", 552 "name": "body", 553 "description": "order placed for purchasing the pet", 554 "required": true, 555 "schema": { 556 "$ref": "#/definitions/Order" 557 } 558 } 559 ], 560 "responses": { 561 "200": { 562 "description": "successful operation", 563 "schema": { 564 "$ref": "#/definitions/Order" 565 } 566 }, 567 "400": { 568 "description": "Invalid Order" 569 } 570 } 571 } 572 }, 573 "/user/{username}": { 574 "get": { 575 "tags": [ 576 "user" 577 ], 578 "summary": "Get user by user name", 579 "description": "", 580 "operationId": "getUserByName", 581 "produces": [ 582 "application/json", 583 "application/xml" 584 ], 585 "parameters": [ 586 { 587 "name": "username", 588 "in": "path", 589 "description": "The name that needs to be fetched. Use user1 for testing. ", 590 "required": true, 591 "type": "string" 592 } 593 ], 594 "responses": { 595 "200": { 596 "description": "successful operation", 597 "schema": { 598 "$ref": "#/definitions/User" 599 } 600 }, 601 "400": { 602 "description": "Invalid username supplied" 603 }, 604 "404": { 605 "description": "User not found" 606 } 607 } 608 }, 609 "put": { 610 "tags": [ 611 "user" 612 ], 613 "summary": "Updated user", 614 "description": "This can only be done by the logged in user.", 615 "operationId": "updateUser", 616 "consumes": [ 617 "application/json" 618 ], 619 "produces": [ 620 "application/json", 621 "application/xml" 622 ], 623 "parameters": [ 624 { 625 "name": "username", 626 "in": "path", 627 "description": "name that need to be updated", 628 "required": true, 629 "type": "string" 630 }, 631 { 632 "in": "body", 633 "name": "body", 634 "description": "Updated user object", 635 "required": true, 636 "schema": { 637 "$ref": "#/definitions/User" 638 } 639 } 640 ], 641 "responses": { 642 "400": { 643 "description": "Invalid user supplied" 644 }, 645 "404": { 646 "description": "User not found" 647 } 648 } 649 }, 650 "delete": { 651 "tags": [ 652 "user" 653 ], 654 "summary": "Delete user", 655 "description": "This can only be done by the logged in user.", 656 "operationId": "deleteUser", 657 "produces": [ 658 "application/json", 659 "application/xml" 660 ], 661 "parameters": [ 662 { 663 "name": "username", 664 "in": "path", 665 "description": "The name that needs to be deleted", 666 "required": true, 667 "type": "string" 668 } 669 ], 670 "responses": { 671 "400": { 672 "description": "Invalid username supplied" 673 }, 674 "404": { 675 "description": "User not found" 676 } 677 } 678 } 679 }, 680 "/user/login": { 681 "get": { 682 "tags": [ 683 "user" 684 ], 685 "summary": "Logs user into the system", 686 "description": "", 687 "operationId": "loginUser", 688 "produces": [ 689 "application/json", 690 "application/xml" 691 ], 692 "parameters": [ 693 { 694 "name": "username", 695 "in": "query", 696 "description": "The user name for login", 697 "required": true, 698 "type": "string" 699 }, 700 { 701 "name": "password", 702 "in": "query", 703 "description": "The password for login in clear text", 704 "required": true, 705 "type": "string" 706 } 707 ], 708 "responses": { 709 "200": { 710 "description": "successful operation", 711 "headers": { 712 "X-Expires-After": { 713 "type": "string", 714 "format": "date-time", 715 "description": "date in UTC when token expires" 716 }, 717 "X-Rate-Limit": { 718 "type": "integer", 719 "format": "int32", 720 "description": "calls per hour allowed by the user" 721 } 722 }, 723 "schema": { 724 "type": "string" 725 } 726 }, 727 "400": { 728 "description": "Invalid username/password supplied" 729 } 730 } 731 } 732 }, 733 "/user/logout": { 734 "get": { 735 "tags": [ 736 "user" 737 ], 738 "summary": "Logs out current logged in user session", 739 "description": "", 740 "operationId": "logoutUser", 741 "produces": [ 742 "application/json", 743 "application/xml" 744 ], 745 "parameters": [], 746 "responses": { 747 "default": { 748 "description": "successful operation" 749 } 750 } 751 } 752 }, 753 "/user": { 754 "post": { 755 "tags": [ 756 "user" 757 ], 758 "summary": "Create user", 759 "description": "This can only be done by the logged in user.", 760 "operationId": "createUser", 761 "consumes": [ 762 "application/json" 763 ], 764 "produces": [ 765 "application/json", 766 "application/xml" 767 ], 768 "parameters": [ 769 { 770 "in": "body", 771 "name": "body", 772 "description": "Created user object", 773 "required": true, 774 "schema": { 775 "$ref": "#/definitions/User" 776 } 777 } 778 ], 779 "responses": { 780 "default": { 781 "description": "successful operation" 782 } 783 } 784 } 785 }, 786 "/user/createWithArray": { 787 "post": { 788 "tags": [ 789 "user" 790 ], 791 "summary": "Creates list of users with given input array", 792 "description": "", 793 "operationId": "createUsersWithArrayInput", 794 "consumes": [ 795 "application/json" 796 ], 797 "produces": [ 798 "application/json", 799 "application/xml" 800 ], 801 "parameters": [ 802 { 803 "in": "body", 804 "name": "body", 805 "description": "List of user object", 806 "required": true, 807 "schema": { 808 "type": "array", 809 "items": { 810 "$ref": "#/definitions/User" 811 } 812 } 813 } 814 ], 815 "responses": { 816 "default": { 817 "description": "successful operation" 818 } 819 } 820 } 821 }, 822 "/user/createWithList": { 823 "post": { 824 "tags": [ 825 "user" 826 ], 827 "summary": "Creates list of users with given input array", 828 "description": "", 829 "operationId": "createUsersWithListInput", 830 "consumes": [ 831 "application/json" 832 ], 833 "produces": [ 834 "application/json", 835 "application/xml" 836 ], 837 "parameters": [ 838 { 839 "in": "body", 840 "name": "body", 841 "description": "List of user object", 842 "required": true, 843 "schema": { 844 "type": "array", 845 "items": { 846 "$ref": "#/definitions/User" 847 } 848 } 849 } 850 ], 851 "responses": { 852 "default": { 853 "description": "successful operation" 854 } 855 } 856 } 857 } 858 }, 859 "securityDefinitions": { 860 "api_key": { 861 "type": "apiKey", 862 "name": "api_key", 863 "in": "header" 864 }, 865 "petstore_auth": { 866 "type": "oauth2", 867 "authorizationUrl": "https://petstore.swagger.io/oauth/authorize", 868 "flow": "implicit", 869 "scopes": { 870 "read:pets": "read your pets", 871 "write:pets": "modify pets in your account" 872 } 873 } 874 }, 875 "definitions": { 876 "Category": { 877 "type": "object", 878 "properties": { 879 "id": { 880 "type": "integer", 881 "format": "int64" 882 }, 883 "name": { 884 "type": "string" 885 } 886 }, 887 "xml": { 888 "name": "Category" 889 } 890 }, 891 "Pet": { 892 "type": "object", 893 "required": [ 894 "name", 895 "photoUrls" 896 ], 897 "properties": { 898 "id": { 899 "type": "integer", 900 "format": "int64" 901 }, 902 "category": { 903 "$ref": "#/definitions/Category" 904 }, 905 "name": { 906 "type": "string", 907 "example": "doggie" 908 }, 909 "photoUrls": { 910 "type": "array", 911 "xml": { 912 "wrapped": true 913 }, 914 "items": { 915 "type": "string", 916 "xml": { 917 "name": "photoUrl" 918 } 919 } 920 }, 921 "tags": { 922 "type": "array", 923 "xml": { 924 "wrapped": true 925 }, 926 "items": { 927 "xml": { 928 "name": "tag" 929 }, 930 "$ref": "#/definitions/Tag" 931 } 932 }, 933 "status": { 934 "type": "string", 935 "description": "pet status in the store", 936 "enum": [ 937 "available", 938 "pending", 939 "sold" 940 ] 941 } 942 }, 943 "xml": { 944 "name": "Pet" 945 } 946 }, 947 "Tag": { 948 "type": "object", 949 "properties": { 950 "id": { 951 "type": "integer", 952 "format": "int64" 953 }, 954 "name": { 955 "type": "string" 956 } 957 }, 958 "xml": { 959 "name": "Tag" 960 } 961 }, 962 "ApiResponse": { 963 "type": "object", 964 "properties": { 965 "code": { 966 "type": "integer", 967 "format": "int32" 968 }, 969 "type": { 970 "type": "string" 971 }, 972 "message": { 973 "type": "string" 974 } 975 } 976 }, 977 "Order": { 978 "type": "object", 979 "properties": { 980 "id": { 981 "type": "integer", 982 "format": "int64" 983 }, 984 "petId": { 985 "type": "integer", 986 "format": "int64" 987 }, 988 "quantity": { 989 "type": "integer", 990 "format": "int32" 991 }, 992 "shipDate": { 993 "type": "string", 994 "format": "date-time" 995 }, 996 "status": { 997 "type": "string", 998 "description": "Order Status", 999 "enum": [ 1000 "placed", 1001 "approved", 1002 "delivered" 1003 ] 1004 }, 1005 "complete": { 1006 "type": "boolean" 1007 } 1008 }, 1009 "xml": { 1010 "name": "Order" 1011 } 1012 }, 1013 "User": { 1014 "type": "object", 1015 "properties": { 1016 "id": { 1017 "type": "integer", 1018 "format": "int64" 1019 }, 1020 "username": { 1021 "type": "string" 1022 }, 1023 "firstName": { 1024 "type": "string" 1025 }, 1026 "lastName": { 1027 "type": "string" 1028 }, 1029 "email": { 1030 "type": "string" 1031 }, 1032 "password": { 1033 "type": "string" 1034 }, 1035 "phone": { 1036 "type": "string" 1037 }, 1038 "userStatus": { 1039 "type": "integer", 1040 "format": "int32", 1041 "description": "User Status" 1042 } 1043 }, 1044 "xml": { 1045 "name": "User" 1046 } 1047 } 1048 }, 1049 "externalDocs": { 1050 "description": "Find out more about Swagger", 1051 "url": "http://swagger.io" 1052 } 1053 }