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