github.com/Axway/agent-sdk@v1.1.101/pkg/apic/testdata/swagger3.json (about)

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