forked from loafle/openapi-generator-original
Merge pull request #2595 from KevinGlinski/csharpdoc
[CSharp] Add auto-generated CSharp documentation in Markdown
This commit is contained in:
@@ -11,6 +11,7 @@ import io.swagger.codegen.SupportingFile;
|
||||
import io.swagger.codegen.CodegenProperty;
|
||||
import io.swagger.codegen.CodegenModel;
|
||||
import io.swagger.codegen.CodegenOperation;
|
||||
import io.swagger.codegen.CodegenParameter;
|
||||
import io.swagger.models.properties.*;
|
||||
import io.swagger.codegen.CliOption;
|
||||
import io.swagger.models.Model;
|
||||
@@ -45,6 +46,8 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
||||
protected String packageCopyright = "No Copyright";
|
||||
protected String clientPackage = "IO.Swagger.Client";
|
||||
protected String localVariablePrefix = "";
|
||||
protected String apiDocPath = "docs/";
|
||||
protected String modelDocPath = "docs/";
|
||||
|
||||
protected String targetFramework = NET45;
|
||||
protected String targetFrameworkNuget = "net45";
|
||||
@@ -62,6 +65,9 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
||||
modelTestTemplateFiles.put("model_test.mustache", ".cs");
|
||||
apiTestTemplateFiles.put("api_test.mustache", ".cs");
|
||||
|
||||
modelDocTemplateFiles.put("model_doc.mustache", ".md");
|
||||
apiDocTemplateFiles.put("api_doc.mustache", ".md");
|
||||
|
||||
// C# client default
|
||||
setSourceFolder("src" + File.separator + "main" + File.separator + "csharp");
|
||||
|
||||
@@ -219,17 +225,19 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
||||
supportingFiles.add(new SupportingFile("compile.mustache", "", "compile.bat"));
|
||||
supportingFiles.add(new SupportingFile("compile-mono.sh.mustache", "", "compile-mono.sh"));
|
||||
supportingFiles.add(new SupportingFile("packages.config.mustache", "vendor" + java.io.File.separator, "packages.config"));
|
||||
supportingFiles.add(new SupportingFile("README.md", "", "README.md"));
|
||||
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
||||
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
|
||||
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
|
||||
|
||||
|
||||
if (optionalAssemblyInfoFlag) {
|
||||
supportingFiles.add(new SupportingFile("AssemblyInfo.mustache", packageFolder + File.separator + "Properties", "AssemblyInfo.cs"));
|
||||
}
|
||||
if (optionalProjectFileFlag) {
|
||||
supportingFiles.add(new SupportingFile("Project.mustache", packageFolder, clientPackage + ".csproj"));
|
||||
}
|
||||
|
||||
additionalProperties.put("apiDocPath", apiDocPath);
|
||||
additionalProperties.put("modelDocPath", modelDocPath);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -467,4 +475,20 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
||||
public void setSupportsUWP(Boolean supportsUWP){
|
||||
this.supportsUWP = supportsUWP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toModelDocFilename(String name) {
|
||||
return toModelFilename(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String apiDocFileFolder() {
|
||||
return (outputFolder + "/" + apiDocPath).replace('/', File.separatorChar);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String modelDocFileFolder() {
|
||||
return (outputFolder + "/" + modelDocPath).replace('/', File.separatorChar);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ Class | Method | HTTP request | Description
|
||||
{{/isBasic}}
|
||||
{{#isOAuth}}- **Type**: OAuth
|
||||
- **Flow**: {{flow}}
|
||||
- **Authorizatoin URL**: {{authorizationUrl}}
|
||||
- **Authorization URL**: {{authorizationUrl}}
|
||||
- **Scopes**: {{^scopes}}N/A{{/scopes}}
|
||||
{{#scopes}} - {{scope}}: {{description}}
|
||||
{{/scopes}}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
## Frameworks supported
|
||||
- .NET 4.0 or later
|
||||
- Windows Phone 7.1 (Mango)
|
||||
|
||||
## Dependencies
|
||||
- [RestSharp] (https://www.nuget.org/packages/RestSharp) - 105.1.0 or later
|
||||
- [Json.NET] (https://www.nuget.org/packages/Newtonsoft.Json/) - 7.0.0 or later
|
||||
|
||||
The DLLs included in the package may not be the latest version. We recommned using [NuGet] (https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:
|
||||
```
|
||||
Install-Package RestSharp
|
||||
Install-Package Newtonsoft.Json
|
||||
```
|
||||
|
||||
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742)
|
||||
|
||||
## Installation
|
||||
Run the following command to generate the DLL
|
||||
- [Mac/Linux] compile-mono.sh
|
||||
- [Windows] compile.bat
|
||||
|
||||
Then include the DLL (under the `bin` folder) in the C# project
|
||||
@@ -0,0 +1,120 @@
|
||||
{{moduleName}} - the C# library for the {{appName}}
|
||||
|
||||
{{#appDescription}}
|
||||
{{{appDescription}}}
|
||||
{{/appDescription}}
|
||||
|
||||
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
||||
|
||||
- API version: {{appVersion}}
|
||||
- Package version: {{gemVersion}}
|
||||
- Build date: {{generatedDate}}
|
||||
- Build package: {{generatorClass}}
|
||||
{{#infoUrl}}
|
||||
For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
|
||||
{{/infoUrl}}
|
||||
|
||||
## Frameworks supported
|
||||
- .NET 4.0 or later
|
||||
- Windows Phone 7.1 (Mango)
|
||||
|
||||
## Dependencies
|
||||
- [RestSharp] (https://www.nuget.org/packages/RestSharp) - 105.1.0 or later
|
||||
- [Json.NET] (https://www.nuget.org/packages/Newtonsoft.Json/) - 7.0.0 or later
|
||||
|
||||
The DLLs included in the package may not be the latest version. We recommned using [NuGet] (https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:
|
||||
```
|
||||
Install-Package RestSharp
|
||||
Install-Package Newtonsoft.Json
|
||||
```
|
||||
|
||||
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742)
|
||||
|
||||
## Installation
|
||||
Run the following command to generate the DLL
|
||||
- [Mac/Linux] compile-mono.sh
|
||||
- [Windows] compile.bat
|
||||
|
||||
Then include the DLL (under the `bin` folder) in the C# project
|
||||
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using {{packageName}}.Api;
|
||||
using {{packageName}}.Client;
|
||||
using {{packageName}}.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class {{operationId}}Example
|
||||
{
|
||||
public void main(){
|
||||
{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}}{{#hasAuthMethods}}{{#authMethods}}{{#isBasic}}
|
||||
// Configure HTTP basic authorization: {{{name}}}
|
||||
Configuration.Default.Username = 'YOUR_USERNAME';
|
||||
Configuration.Default.Password = 'YOUR_PASSWORD';{{/isBasic}}{{#isApiKey}}
|
||||
// Configure API key authorization: {{{name}}}
|
||||
Configuration.Default.ApiKey.Add('{{{keyParamName}}}', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Configuration.Default.ApiKeyPrefix.Add('{{{keyParamName}}}', 'BEARER');{{/isApiKey}}{{#isOAuth}}
|
||||
// Configure OAuth2 access token for authorization: {{{name}}}
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';{{/isOAuth}}{{/authMethods}}
|
||||
{{/hasAuthMethods}}
|
||||
|
||||
var apiInstance = new {{classname}}();
|
||||
{{#allParams}}
|
||||
{{#isPrimitiveType}}
|
||||
var {{paramName}} = {{example}}; // {{{dataType}}} | {{{description}}}
|
||||
{{/isPrimitiveType}}
|
||||
{{^isPrimitiveType}}
|
||||
var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}
|
||||
{{/isPrimitiveType}}
|
||||
{{/allParams}}
|
||||
|
||||
try {
|
||||
{{#returnType}}{{returnType}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
|
||||
Debug.WriteLine(result);{{/returnType}}
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling {{classname}}.{{operationId}}: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}}
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *{{basePath}}*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}}
|
||||
{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
{{#models}}{{#model}} - [{{classname}}]({{modelDocPath}}{{classname}}.md)
|
||||
{{/model}}{{/models}}
|
||||
|
||||
## Documentation for Authorization
|
||||
|
||||
{{^authMethods}} All endpoints do not require authorization.
|
||||
{{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}}
|
||||
{{#authMethods}}### {{name}}
|
||||
|
||||
{{#isApiKey}}- **Type**: API key
|
||||
- **API key parameter name**: {{keyParamName}}
|
||||
- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
|
||||
{{/isApiKey}}
|
||||
{{#isBasic}}- **Type**: HTTP basic authentication
|
||||
{{/isBasic}}
|
||||
{{#isOAuth}}- **Type**: OAuth
|
||||
- **Flow**: {{flow}}
|
||||
- **Authorization URL**: {{authorizationUrl}}
|
||||
- **Scopes**: {{^scopes}}N/A{{/scopes}}
|
||||
{{#scopes}} - {{scope}}: {{description}}
|
||||
{{/scopes}}
|
||||
{{/isOAuth}}
|
||||
|
||||
{{/authMethods}}
|
||||
@@ -0,0 +1,87 @@
|
||||
# {{packageName}}.Api.{{classname}}{{#description}}
|
||||
{{description}}{{/description}}
|
||||
|
||||
All URIs are relative to *{{basePath}}*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}
|
||||
{{/operation}}{{/operations}}
|
||||
|
||||
{{#operations}}
|
||||
{{#operation}}
|
||||
# **{{{operationId}}}**
|
||||
> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||
|
||||
{{{summary}}}{{#notes}}
|
||||
|
||||
{{{notes}}}{{/notes}}
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using {{packageName}}.Api;
|
||||
using {{packageName}}.Client;
|
||||
using {{packageName}}.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class {{operationId}}Example
|
||||
{
|
||||
public void main(){
|
||||
{{#hasAuthMethods}}{{#authMethods}}{{#isBasic}}
|
||||
// Configure HTTP basic authorization: {{{name}}}
|
||||
Configuration.Default.Username = 'YOUR_USERNAME';
|
||||
Configuration.Default.Password = 'YOUR_PASSWORD';{{/isBasic}}{{#isApiKey}}
|
||||
// Configure API key authorization: {{{name}}}
|
||||
Configuration.Default.ApiKey.Add('{{{keyParamName}}}', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Configuration.Default.ApiKeyPrefix.Add('{{{keyParamName}}}', 'BEARER');{{/isApiKey}}{{#isOAuth}}
|
||||
// Configure OAuth2 access token for authorization: {{{name}}}
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';{{/isOAuth}}{{/authMethods}}
|
||||
{{/hasAuthMethods}}
|
||||
|
||||
var apiInstance = new {{classname}}();
|
||||
{{#allParams}}
|
||||
{{#isPrimitiveType}}
|
||||
var {{paramName}} = {{example}}; // {{{dataType}}} | {{{description}}}
|
||||
{{/isPrimitiveType}}
|
||||
{{^isPrimitiveType}}
|
||||
var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}
|
||||
{{/isPrimitiveType}}
|
||||
{{/allParams}}
|
||||
|
||||
try {
|
||||
{{#returnType}}{{returnType}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
|
||||
Debug.WriteLine(result);{{/returnType}}
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling {{classname}}.{{operationId}}: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}
|
||||
{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
|
||||
{{/allParams}}
|
||||
|
||||
### Return type
|
||||
|
||||
{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}}
|
||||
|
||||
### Authorization
|
||||
|
||||
{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}}
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: {{#consumes}}{{mediaType}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
|
||||
- **Accept**: {{#produces}}{{mediaType}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}}
|
||||
|
||||
{{/operation}}
|
||||
{{/operations}}
|
||||
@@ -0,0 +1,10 @@
|
||||
{{#models}}{{#model}}# {{classname}}
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
||||
{{/vars}}
|
||||
|
||||
{{/model}}{{/models}}
|
||||
@@ -135,7 +135,7 @@ Class | Method | HTTP request | Description
|
||||
{{/isBasic}}
|
||||
{{#isOAuth}}- **Type**: OAuth
|
||||
- **Flow**: {{{flow}}}
|
||||
- **Authorizatoin URL**: {{{authorizationUrl}}}
|
||||
- **Authorization URL**: {{{authorizationUrl}}}
|
||||
- **Scopes**: {{^scopes}}N/A{{/scopes}}
|
||||
{{#scopes}} - **{{{scope}}}**: {{{description}}}
|
||||
{{/scopes}}
|
||||
|
||||
@@ -303,7 +303,7 @@ Class | Method | HTTP request | Description
|
||||
{{/isBasic}}
|
||||
{{#isOAuth}}- **Type**: OAuth
|
||||
- **Flow**: {{{flow}}}
|
||||
- **Authorizatoin URL**: {{{authorizationUrl}}}
|
||||
- **Authorization URL**: {{{authorizationUrl}}}
|
||||
- **Scopes**: {{^scopes}}N/A{{/scopes}}
|
||||
{{#scopes}} - **{{{scope}}}**: {{{description}}}
|
||||
{{/scopes}}
|
||||
|
||||
@@ -116,7 +116,7 @@ Class | Method | HTTP request | Description
|
||||
{{/isBasic}}
|
||||
{{#isOAuth}}- **Type**: OAuth
|
||||
- **Flow**: {{{flow}}}
|
||||
- **Authorizatoin URL**: {{{authorizationUrl}}}
|
||||
- **Authorization URL**: {{{authorizationUrl}}}
|
||||
- **Scopes**: {{^scopes}}N/A{{/scopes}}
|
||||
{{#scopes}} - **{{{scope}}}**: {{{description}}}
|
||||
{{/scopes}}
|
||||
|
||||
@@ -108,7 +108,7 @@ Class | Method | HTTP request | Description
|
||||
{{/isBasic}}
|
||||
{{#isOAuth}}- **Type**: OAuth
|
||||
- **Flow**: {{{flow}}}
|
||||
- **Authorizatoin URL**: {{{authorizationUrl}}}
|
||||
- **Authorization URL**: {{{authorizationUrl}}}
|
||||
- **Scopes**: {{^scopes}}N/A{{/scopes}}
|
||||
{{#scopes}} - **{{{scope}}}**: {{{description}}}
|
||||
{{/scopes}}
|
||||
|
||||
@@ -119,7 +119,7 @@ Class | Method | HTTP request | Description
|
||||
{{/isBasic}}
|
||||
{{#isOAuth}}- **Type**: OAuth
|
||||
- **Flow**: {{flow}}
|
||||
- **Authorizatoin URL**: {{authorizationUrl}}
|
||||
- **Authorization URL**: {{authorizationUrl}}
|
||||
- **Scopes**: {{^scopes}}N/A{{/scopes}}
|
||||
{{#scopes}} - {{scope}}: {{description}}
|
||||
{{/scopes}}
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace IO.Swagger.Test
|
||||
// TODO: add unit test for the method 'UploadFile'
|
||||
long? petId = null; // TODO: replace null with proper value
|
||||
string additionalMetadata = null; // TODO: replace null with proper value
|
||||
System.IO.Stream file = null; // TODO: replace null with proper value
|
||||
Stream file = null; // TODO: replace null with proper value
|
||||
var response = instance.UploadFile(petId, additionalMetadata, file);
|
||||
Assert.IsInstanceOf<ApiResponse> (response, "response is ApiResponse");
|
||||
}
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
- the C# library for the Swagger Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose.
|
||||
|
||||
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version:
|
||||
- Build date: 2016-04-14T08:34:43.608-04:00
|
||||
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
|
||||
|
||||
## Frameworks supported
|
||||
- .NET 4.0 or later
|
||||
- Windows Phone 7.1 (Mango)
|
||||
@@ -20,3 +31,99 @@ Run the following command to generate the DLL
|
||||
- [Windows] compile.bat
|
||||
|
||||
Then include the DLL (under the `bin` folder) in the C# project
|
||||
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class Example
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var body = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
|
||||
try {
|
||||
apiInstance.AddPet(body);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.AddPet: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*::PetApi* | [**AddPet**](docs/PetApi.md#AddPet) | **POST** /pet | Add a new pet to the store
|
||||
*::PetApi* | [**DeletePet**](docs/PetApi.md#DeletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
*::PetApi* | [**FindPetsByStatus**](docs/PetApi.md#FindPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
*::PetApi* | [**FindPetsByTags**](docs/PetApi.md#FindPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
*::PetApi* | [**GetPetById**](docs/PetApi.md#GetPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
*::PetApi* | [**UpdatePet**](docs/PetApi.md#UpdatePet) | **PUT** /pet | Update an existing pet
|
||||
*::PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#UpdatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*::PetApi* | [**UploadFile**](docs/PetApi.md#UploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*::StoreApi* | [**DeleteOrder**](docs/StoreApi.md#DeleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
*::StoreApi* | [**GetInventory**](docs/StoreApi.md#GetInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*::StoreApi* | [**GetOrderById**](docs/StoreApi.md#GetOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
*::StoreApi* | [**PlaceOrder**](docs/StoreApi.md#PlaceOrder) | **POST** /store/order | Place an order for a pet
|
||||
*::UserApi* | [**CreateUser**](docs/UserApi.md#CreateUser) | **POST** /user | Create user
|
||||
*::UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#CreateUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
*::UserApi* | [**CreateUsersWithListInput**](docs/UserApi.md#CreateUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
*::UserApi* | [**DeleteUser**](docs/UserApi.md#DeleteUser) | **DELETE** /user/{username} | Delete user
|
||||
*::UserApi* | [**GetUserByName**](docs/UserApi.md#GetUserByName) | **GET** /user/{username} | Get user by user name
|
||||
*::UserApi* | [**LoginUser**](docs/UserApi.md#LoginUser) | **GET** /user/login | Logs user into the system
|
||||
*::UserApi* | [**LogoutUser**](docs/UserApi.md#LogoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||
*::UserApi* | [**UpdateUser**](docs/UserApi.md#UpdateUser) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
- [::Animal](docs/Animal.md)
|
||||
- [::ApiResponse](docs/ApiResponse.md)
|
||||
- [::Cat](docs/Cat.md)
|
||||
- [::Category](docs/Category.md)
|
||||
- [::Dog](docs/Dog.md)
|
||||
- [::FormatTest](docs/FormatTest.md)
|
||||
- [::Model200Response](docs/Model200Response.md)
|
||||
- [::ModelReturn](docs/ModelReturn.md)
|
||||
- [::Name](docs/Name.md)
|
||||
- [::Order](docs/Order.md)
|
||||
- [::Pet](docs/Pet.md)
|
||||
- [::SpecialModelName](docs/SpecialModelName.md)
|
||||
- [::Tag](docs/Tag.md)
|
||||
- [::User](docs/User.md)
|
||||
|
||||
|
||||
## Documentation for Authorization
|
||||
|
||||
|
||||
### petstore_auth
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorizatoin URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Scopes**:
|
||||
- write:pets: modify pets in your account
|
||||
- read:pets: read your pets
|
||||
|
||||
### api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
- the C# library for the Swagger Petstore
|
||||
|
||||
This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
|
||||
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version:
|
||||
- Build date: 2016-04-14T06:55:47.468-04:00
|
||||
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
|
||||
|
||||
## Frameworks supported
|
||||
- .NET 4.0 or later
|
||||
- Windows Phone 7.1 (Mango)
|
||||
|
||||
## Dependencies
|
||||
- [RestSharp] (https://www.nuget.org/packages/RestSharp) - 105.1.0 or later
|
||||
- [Json.NET] (https://www.nuget.org/packages/Newtonsoft.Json/) - 7.0.0 or later
|
||||
|
||||
The DLLs included in the package may not be the latest version. We recommned using [NuGet] (https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:
|
||||
```
|
||||
Install-Package RestSharp
|
||||
Install-Package Newtonsoft.Json
|
||||
```
|
||||
|
||||
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742)
|
||||
|
||||
## Installation
|
||||
Run the following command to generate the DLL
|
||||
- [Mac/Linux] compile-mono.sh
|
||||
- [Windows] compile.bat
|
||||
|
||||
Then include the DLL (under the `bin` folder) in the C# project
|
||||
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class Example
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
// Configure API key authorization: test_api_client_id
|
||||
Configuration.Default.ApiKey.Add('x-test_api_client_id', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Configuration.Default.ApiKeyPrefix.Add('x-test_api_client_id', 'BEARER');
|
||||
// Configure API key authorization: test_api_client_secret
|
||||
Configuration.Default.ApiKey.Add('x-test_api_client_secret', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Configuration.Default.ApiKeyPrefix.Add('x-test_api_client_secret', 'BEARER');
|
||||
// Configure API key authorization: api_key
|
||||
Configuration.Default.ApiKey.Add('api_key', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Configuration.Default.ApiKeyPrefix.Add('api_key', 'BEARER');
|
||||
// Configure HTTP basic authorization: test_http_basic
|
||||
Configuration.Default.Username = 'YOUR_USERNAME';
|
||||
Configuration.Default.Password = 'YOUR_PASSWORD';
|
||||
// Configure API key authorization: test_api_key_query
|
||||
Configuration.Default.ApiKey.Add('test_api_key_query', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Configuration.Default.ApiKeyPrefix.Add('test_api_key_query', 'BEARER');
|
||||
// Configure API key authorization: test_api_key_header
|
||||
Configuration.Default.ApiKey.Add('test_api_key_header', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Configuration.Default.ApiKeyPrefix.Add('test_api_key_header', 'BEARER');
|
||||
|
||||
var apiInstance = new ();
|
||||
|
||||
try {
|
||||
apiInstance.();
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling .: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*::PetApi* | [**AddPet**](docs/PetApi.md#AddPet) | **POST** /pet | Add a new pet to the store
|
||||
*::PetApi* | [**AddPetUsingByteArray**](docs/PetApi.md#AddPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
*::PetApi* | [**DeletePet**](docs/PetApi.md#DeletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
*::PetApi* | [**FindPetsByStatus**](docs/PetApi.md#FindPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
*::PetApi* | [**FindPetsByTags**](docs/PetApi.md#FindPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
*::PetApi* | [**GetPetById**](docs/PetApi.md#GetPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
*::PetApi* | [**GetPetByIdInObject**](docs/PetApi.md#GetPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
*::PetApi* | [**PetPetIdtestingByteArraytrueGet**](docs/PetApi.md#PetPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
*::PetApi* | [**UpdatePet**](docs/PetApi.md#UpdatePet) | **PUT** /pet | Update an existing pet
|
||||
*::PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#UpdatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*::PetApi* | [**UploadFile**](docs/PetApi.md#UploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*::StoreApi* | [**DeleteOrder**](docs/StoreApi.md#DeleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
*::StoreApi* | [**FindOrdersByStatus**](docs/StoreApi.md#FindOrdersByStatus) | **GET** /store/findByStatus | Finds orders by status
|
||||
*::StoreApi* | [**GetInventory**](docs/StoreApi.md#GetInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*::StoreApi* | [**GetInventoryInObject**](docs/StoreApi.md#GetInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
*::StoreApi* | [**GetOrderById**](docs/StoreApi.md#GetOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
*::StoreApi* | [**PlaceOrder**](docs/StoreApi.md#PlaceOrder) | **POST** /store/order | Place an order for a pet
|
||||
*::UserApi* | [**CreateUser**](docs/UserApi.md#CreateUser) | **POST** /user | Create user
|
||||
*::UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#CreateUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
*::UserApi* | [**CreateUsersWithListInput**](docs/UserApi.md#CreateUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
*::UserApi* | [**DeleteUser**](docs/UserApi.md#DeleteUser) | **DELETE** /user/{username} | Delete user
|
||||
*::UserApi* | [**GetUserByName**](docs/UserApi.md#GetUserByName) | **GET** /user/{username} | Get user by user name
|
||||
*::UserApi* | [**LoginUser**](docs/UserApi.md#LoginUser) | **GET** /user/login | Logs user into the system
|
||||
*::UserApi* | [**LogoutUser**](docs/UserApi.md#LogoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||
*::UserApi* | [**UpdateUser**](docs/UserApi.md#UpdateUser) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
- [::Animal](docs/Animal.md)
|
||||
- [::Cat](docs/Cat.md)
|
||||
- [::Category](docs/Category.md)
|
||||
- [::Dog](docs/Dog.md)
|
||||
- [::FormatTest](docs/FormatTest.md)
|
||||
- [::InlineResponse200](docs/InlineResponse200.md)
|
||||
- [::Model200Response](docs/Model200Response.md)
|
||||
- [::ModelReturn](docs/ModelReturn.md)
|
||||
- [::Name](docs/Name.md)
|
||||
- [::Order](docs/Order.md)
|
||||
- [::Pet](docs/Pet.md)
|
||||
- [::SpecialModelName](docs/SpecialModelName.md)
|
||||
- [::Tag](docs/Tag.md)
|
||||
- [::User](docs/User.md)
|
||||
|
||||
|
||||
## Documentation for Authorization
|
||||
|
||||
|
||||
### petstore_auth
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Scopes**:
|
||||
- write:pets: modify pets in your account
|
||||
- read:pets: read your pets
|
||||
|
||||
### test_api_client_id
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: x-test_api_client_id
|
||||
- **Location**: HTTP header
|
||||
|
||||
### test_api_client_secret
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: x-test_api_client_secret
|
||||
- **Location**: HTTP header
|
||||
|
||||
### api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
### test_http_basic
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
|
||||
### test_api_key_query
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: test_api_key_query
|
||||
- **Location**: URL query string
|
||||
|
||||
### test_api_key_header
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: test_api_key_header
|
||||
- **Location**: HTTP header
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Animal
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ClassName** | **string** | |
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# ApiResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Code** | **int?** | | [optional]
|
||||
**Type** | **string** | | [optional]
|
||||
**Message** | **string** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Cat
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ClassName** | **string** | |
|
||||
**Declawed** | **bool?** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Category
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**Name** | **string** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Dog
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ClassName** | **string** | |
|
||||
**Breed** | **string** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# FormatTest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Integer** | **int?** | | [optional]
|
||||
**Int32** | **int?** | | [optional]
|
||||
**Int64** | **long?** | | [optional]
|
||||
**Number** | **double?** | |
|
||||
**_Float** | **float?** | | [optional]
|
||||
**_Double** | **double?** | | [optional]
|
||||
**_String** | **string** | | [optional]
|
||||
**_Byte** | **byte[]** | | [optional]
|
||||
**Binary** | **byte[]** | | [optional]
|
||||
**Date** | **DateTime?** | | [optional]
|
||||
**DateTime** | **DateTime?** | | [optional]
|
||||
**Password** | **string** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# InlineResponse200
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**PhotoUrls** | **List<string>** | | [optional]
|
||||
**Name** | **string** | | [optional]
|
||||
**Id** | **long?** | |
|
||||
**Category** | **Object** | | [optional]
|
||||
**Tags** | [**List<Tag>**](Tag.md) | | [optional]
|
||||
**Status** | **string** | pet status in the store | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Model200Response
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **int?** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# ModelReturn
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Return** | **int?** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Name
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Name** | **int?** | |
|
||||
**SnakeCase** | **int?** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# Order
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**PetId** | **long?** | | [optional]
|
||||
**Quantity** | **int?** | | [optional]
|
||||
**ShipDate** | **DateTime?** | | [optional]
|
||||
**Status** | **string** | Order Status | [optional]
|
||||
**Complete** | **bool?** | | [optional] [default to false]
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# Pet
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**Category** | [**Category**](Category.md) | | [optional]
|
||||
**Name** | **string** | |
|
||||
**PhotoUrls** | **List<string>** | |
|
||||
**Tags** | [**List<Tag>**](Tag.md) | | [optional]
|
||||
**Status** | **string** | pet status in the store | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,480 @@
|
||||
# IO.Swagger.Api.PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**AddPet**](PetApi.md#AddPet) | **POST** /pet | Add a new pet to the store
|
||||
[**DeletePet**](PetApi.md#DeletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**FindPetsByStatus**](PetApi.md#FindPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**FindPetsByTags**](PetApi.md#FindPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**GetPetById**](PetApi.md#GetPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**UpdatePet**](PetApi.md#UpdatePet) | **PUT** /pet | Update an existing pet
|
||||
[**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**UploadFile**](PetApi.md#UploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
|
||||
|
||||
# **AddPet**
|
||||
> AddPet(body)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class AddPetExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var body = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
|
||||
try {
|
||||
apiInstance.AddPet(body);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.AddPet: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **DeletePet**
|
||||
> DeletePet(petId, apiKey)
|
||||
|
||||
Deletes a pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class DeletePetExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var petId = 789; // long? | Pet id to delete
|
||||
var apiKey = apiKey_example; // string |
|
||||
|
||||
try {
|
||||
apiInstance.DeletePet(petId, apiKey);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.DeletePet: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **long?**| Pet id to delete |
|
||||
**apiKey** | **string**| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **FindPetsByStatus**
|
||||
> List<Pet> FindPetsByStatus(status)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
Multiple status values can be provided with comma separated strings
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class FindPetsByStatusExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var status = new List<string>(); // List<string> | Status values that need to be considered for filter
|
||||
|
||||
try {
|
||||
List<Pet> result = apiInstance.FindPetsByStatus(status);
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.FindPetsByStatus: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**List<string>**](string.md)| Status values that need to be considered for filter |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **FindPetsByTags**
|
||||
> List<Pet> FindPetsByTags(tags)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class FindPetsByTagsExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var tags = new List<string>(); // List<string> | Tags to filter by
|
||||
|
||||
try {
|
||||
List<Pet> result = apiInstance.FindPetsByTags(tags);
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.FindPetsByTags: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**List<string>**](string.md)| Tags to filter by |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **GetPetById**
|
||||
> Pet GetPetById(petId)
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a single pet
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class GetPetByIdExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
Configuration.Default.ApiKey.Add('api_key', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Configuration.Default.ApiKeyPrefix.Add('api_key', 'BEARER');
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var petId = 789; // long? | ID of pet to return
|
||||
|
||||
try {
|
||||
Pet result = apiInstance.GetPetById(petId);
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.GetPetById: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **long?**| ID of pet to return |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Pet**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **UpdatePet**
|
||||
> UpdatePet(body)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class UpdatePetExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var body = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
|
||||
try {
|
||||
apiInstance.UpdatePet(body);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.UpdatePet: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **UpdatePetWithForm**
|
||||
> UpdatePetWithForm(petId, name, status)
|
||||
|
||||
Updates a pet in the store with form data
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class UpdatePetWithFormExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var petId = 789; // long? | ID of pet that needs to be updated
|
||||
var name = name_example; // string | Updated name of the pet
|
||||
var status = status_example; // string | Updated status of the pet
|
||||
|
||||
try {
|
||||
apiInstance.UpdatePetWithForm(petId, name, status);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.UpdatePetWithForm: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **long?**| ID of pet that needs to be updated |
|
||||
**name** | **string**| Updated name of the pet | [optional]
|
||||
**status** | **string**| Updated status of the pet | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **UploadFile**
|
||||
> ApiResponse UploadFile(petId, additionalMetadata, file)
|
||||
|
||||
uploads an image
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class UploadFileExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var petId = 789; // long? | ID of pet to update
|
||||
var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server
|
||||
var file = new Stream(); // Stream | file to upload
|
||||
|
||||
try {
|
||||
ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file);
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **long?**| ID of pet to update |
|
||||
**additionalMetadata** | **string**| Additional data to pass to server | [optional]
|
||||
**file** | **Stream**| file to upload | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# SpecialModelName
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**SpecialPropertyName** | **long?** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
# IO.Swagger.Api.StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**DeleteOrder**](StoreApi.md#DeleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
[**GetInventory**](StoreApi.md#GetInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**GetOrderById**](StoreApi.md#GetOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
[**PlaceOrder**](StoreApi.md#PlaceOrder) | **POST** /store/order | Place an order for a pet
|
||||
|
||||
|
||||
# **DeleteOrder**
|
||||
> DeleteOrder(orderId)
|
||||
|
||||
Delete purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class DeleteOrderExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
var apiInstance = new StoreApi();
|
||||
var orderId = orderId_example; // string | ID of the order that needs to be deleted
|
||||
|
||||
try {
|
||||
apiInstance.DeleteOrder(orderId);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling StoreApi.DeleteOrder: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **string**| ID of the order that needs to be deleted |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **GetInventory**
|
||||
> Dictionary<string, int?> GetInventory()
|
||||
|
||||
Returns pet inventories by status
|
||||
|
||||
Returns a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class GetInventoryExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
Configuration.Default.ApiKey.Add('api_key', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Configuration.Default.ApiKeyPrefix.Add('api_key', 'BEARER');
|
||||
|
||||
var apiInstance = new StoreApi();
|
||||
|
||||
try {
|
||||
Dictionary<string, int?> result = apiInstance.GetInventory();
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling StoreApi.GetInventory: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**Dictionary<string, int?>**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
# **GetOrderById**
|
||||
> Order GetOrderById(orderId)
|
||||
|
||||
Find purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class GetOrderByIdExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
var apiInstance = new StoreApi();
|
||||
var orderId = 789; // long? | ID of pet that needs to be fetched
|
||||
|
||||
try {
|
||||
Order result = apiInstance.GetOrderById(orderId);
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling StoreApi.GetOrderById: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **long?**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **PlaceOrder**
|
||||
> Order PlaceOrder(body)
|
||||
|
||||
Place an order for a pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class PlaceOrderExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
var apiInstance = new StoreApi();
|
||||
var body = new Order(); // Order | order placed for purchasing the pet
|
||||
|
||||
try {
|
||||
Order result = apiInstance.PlaceOrder(body);
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling StoreApi.PlaceOrder: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Tag
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**Name** | **string** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# User
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**Username** | **string** | | [optional]
|
||||
**FirstName** | **string** | | [optional]
|
||||
**LastName** | **string** | | [optional]
|
||||
**Email** | **string** | | [optional]
|
||||
**Password** | **string** | | [optional]
|
||||
**Phone** | **string** | | [optional]
|
||||
**UserStatus** | **int?** | User Status | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,442 @@
|
||||
# IO.Swagger.Api.UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**CreateUser**](UserApi.md#CreateUser) | **POST** /user | Create user
|
||||
[**CreateUsersWithArrayInput**](UserApi.md#CreateUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
[**CreateUsersWithListInput**](UserApi.md#CreateUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
[**DeleteUser**](UserApi.md#DeleteUser) | **DELETE** /user/{username} | Delete user
|
||||
[**GetUserByName**](UserApi.md#GetUserByName) | **GET** /user/{username} | Get user by user name
|
||||
[**LoginUser**](UserApi.md#LoginUser) | **GET** /user/login | Logs user into the system
|
||||
[**LogoutUser**](UserApi.md#LogoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||
[**UpdateUser**](UserApi.md#UpdateUser) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
# **CreateUser**
|
||||
> CreateUser(body)
|
||||
|
||||
Create user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class CreateUserExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
var apiInstance = new UserApi();
|
||||
var body = new User(); // User | Created user object
|
||||
|
||||
try {
|
||||
apiInstance.CreateUser(body);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling UserApi.CreateUser: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**User**](User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **CreateUsersWithArrayInput**
|
||||
> CreateUsersWithArrayInput(body)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class CreateUsersWithArrayInputExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
var apiInstance = new UserApi();
|
||||
var body = new List<User>(); // List<User> | List of user object
|
||||
|
||||
try {
|
||||
apiInstance.CreateUsersWithArrayInput(body);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling UserApi.CreateUsersWithArrayInput: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **CreateUsersWithListInput**
|
||||
> CreateUsersWithListInput(body)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class CreateUsersWithListInputExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
var apiInstance = new UserApi();
|
||||
var body = new List<User>(); // List<User> | List of user object
|
||||
|
||||
try {
|
||||
apiInstance.CreateUsersWithListInput(body);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling UserApi.CreateUsersWithListInput: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **DeleteUser**
|
||||
> DeleteUser(username)
|
||||
|
||||
Delete user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class DeleteUserExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
var apiInstance = new UserApi();
|
||||
var username = username_example; // string | The name that needs to be deleted
|
||||
|
||||
try {
|
||||
apiInstance.DeleteUser(username);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling UserApi.DeleteUser: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **string**| The name that needs to be deleted |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **GetUserByName**
|
||||
> User GetUserByName(username)
|
||||
|
||||
Get user by user name
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class GetUserByNameExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
var apiInstance = new UserApi();
|
||||
var username = username_example; // string | The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
try {
|
||||
User result = apiInstance.GetUserByName(username);
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling UserApi.GetUserByName: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **string**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
[**User**](User.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **LoginUser**
|
||||
> string LoginUser(username, password)
|
||||
|
||||
Logs user into the system
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class LoginUserExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
var apiInstance = new UserApi();
|
||||
var username = username_example; // string | The user name for login
|
||||
var password = password_example; // string | The password for login in clear text
|
||||
|
||||
try {
|
||||
string result = apiInstance.LoginUser(username, password);
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling UserApi.LoginUser: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **string**| The user name for login |
|
||||
**password** | **string**| The password for login in clear text |
|
||||
|
||||
### Return type
|
||||
|
||||
**string**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **LogoutUser**
|
||||
> LogoutUser()
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class LogoutUserExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
var apiInstance = new UserApi();
|
||||
|
||||
try {
|
||||
apiInstance.LogoutUser();
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling UserApi.LogoutUser: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **UpdateUser**
|
||||
> UpdateUser(username, body)
|
||||
|
||||
Updated user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class UpdateUserExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
var apiInstance = new UserApi();
|
||||
var username = username_example; // string | name that need to be deleted
|
||||
var body = new User(); // User | Updated user object
|
||||
|
||||
try {
|
||||
apiInstance.UpdateUser(username, body);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling UserApi.UpdateUser: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **string**| name that need to be deleted |
|
||||
**body** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
@@ -178,7 +179,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="file">file to upload (optional)</param>
|
||||
/// <returns>ApiResponse</returns>
|
||||
ApiResponse UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
|
||||
ApiResponse UploadFile (long? petId, string additionalMetadata = null, Stream file = null);
|
||||
|
||||
/// <summary>
|
||||
/// uploads an image
|
||||
@@ -191,7 +192,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="file">file to upload (optional)</param>
|
||||
/// <returns>ApiResponse of ApiResponse</returns>
|
||||
ApiResponse<ApiResponse> UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
|
||||
ApiResponse<ApiResponse> UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, Stream file = null);
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
@@ -358,7 +359,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="file">file to upload (optional)</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse> UploadFileAsync (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
|
||||
System.Threading.Tasks.Task<ApiResponse> UploadFileAsync (long? petId, string additionalMetadata = null, Stream file = null);
|
||||
|
||||
/// <summary>
|
||||
/// uploads an image
|
||||
@@ -371,7 +372,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="file">file to upload (optional)</param>
|
||||
/// <returns>Task of ApiResponse (ApiResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<ApiResponse>> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
|
||||
System.Threading.Tasks.Task<ApiResponse<ApiResponse>> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, Stream file = null);
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
@@ -1588,7 +1589,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="file">file to upload (optional)</param>
|
||||
/// <returns>ApiResponse</returns>
|
||||
public ApiResponse UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
|
||||
public ApiResponse UploadFile (long? petId, string additionalMetadata = null, Stream file = null)
|
||||
{
|
||||
ApiResponse<ApiResponse> localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file);
|
||||
return localVarResponse.Data;
|
||||
@@ -1602,7 +1603,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="file">file to upload (optional)</param>
|
||||
/// <returns>ApiResponse of ApiResponse</returns>
|
||||
public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
|
||||
public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, Stream file = null)
|
||||
{
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null)
|
||||
@@ -1670,7 +1671,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="file">file to upload (optional)</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse> UploadFileAsync (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
|
||||
public async System.Threading.Tasks.Task<ApiResponse> UploadFileAsync (long? petId, string additionalMetadata = null, Stream file = null)
|
||||
{
|
||||
ApiResponse<ApiResponse> localVarResponse = await UploadFileAsyncWithHttpInfo(petId, additionalMetadata, file);
|
||||
return localVarResponse.Data;
|
||||
@@ -1685,7 +1686,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="file">file to upload (optional)</param>
|
||||
/// <returns>Task of ApiResponse (ApiResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<ApiResponse>> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
|
||||
public async System.Threading.Tasks.Task<ApiResponse<ApiResponse>> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, Stream file = null)
|
||||
{
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
|
||||
@@ -165,7 +165,7 @@ Class | Method | HTTP request | Description
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorizatoin URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Scopes**:
|
||||
- write:pets: modify pets in your account
|
||||
- read:pets: read your pets
|
||||
|
||||
@@ -61,7 +61,7 @@ null (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -110,7 +110,7 @@ null (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -162,7 +162,7 @@ null (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -211,7 +211,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -260,7 +260,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -314,7 +314,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -368,7 +368,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -422,7 +422,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -471,7 +471,7 @@ null (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -525,7 +525,7 @@ null (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -579,7 +579,7 @@ null (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
@@ -50,7 +50,7 @@ null (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -107,7 +107,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -151,7 +151,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -195,7 +195,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -251,7 +251,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[test_api_key_header](../README.md#test_api_key_header), [test_api_key_query](../README.md#test_api_key_query)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -308,7 +308,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
@@ -53,7 +53,7 @@ null (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -97,7 +97,7 @@ null (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -141,7 +141,7 @@ null (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -190,7 +190,7 @@ null (empty response body)
|
||||
|
||||
[test_http_basic](../README.md#test_http_basic)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -233,7 +233,7 @@ Name | Type | Description | Notes
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -279,7 +279,7 @@ Name | Type | Description | Notes
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -316,7 +316,7 @@ null (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -363,7 +363,7 @@ null (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
@@ -168,7 +168,7 @@ Class | Method | HTTP request | Description
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorizatoin URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Scopes**:
|
||||
- write:pets: modify pets in your account
|
||||
- read:pets: read your pets
|
||||
|
||||
@@ -64,7 +64,7 @@ null (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -116,7 +116,7 @@ null (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -171,7 +171,7 @@ null (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -223,7 +223,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -275,7 +275,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -332,7 +332,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -389,7 +389,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -446,7 +446,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -498,7 +498,7 @@ null (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -555,7 +555,7 @@ null (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -612,7 +612,7 @@ null (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
@@ -53,7 +53,7 @@ null (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -113,7 +113,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -160,7 +160,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -207,7 +207,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -266,7 +266,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[test_api_key_header](../README.md#test_api_key_header), [test_api_key_query](../README.md#test_api_key_query)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -326,7 +326,7 @@ Name | Type | Description | Notes
|
||||
|
||||
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
@@ -56,7 +56,7 @@ null (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -103,7 +103,7 @@ null (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -150,7 +150,7 @@ null (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -202,7 +202,7 @@ null (empty response body)
|
||||
|
||||
[test_http_basic](../README.md#test_http_basic)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -248,7 +248,7 @@ Name | Type | Description | Notes
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -297,7 +297,7 @@ Name | Type | Description | Notes
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -337,7 +337,7 @@ null (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
@@ -387,7 +387,7 @@ null (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
@@ -10,10 +10,13 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
|
||||
[**add_pet_using_byte_array**](PetApi.md#add_pet_using_byte_array) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
[**delete_pet**](PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**find_pets_by_status**](PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**get_pet_by_id**](PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**get_pet_by_id_in_object**](PetApi.md#get_pet_by_id_in_object) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
[**pet_pet_idtesting_byte_arraytrue_get**](PetApi.md#pet_pet_idtesting_byte_arraytrue_get) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
[**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
|
||||
[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
@@ -48,7 +51,7 @@ if ($@) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -58,10 +61,56 @@ void (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **add_pet_using_byte_array**
|
||||
> add_pet_using_byte_array(body => $body)
|
||||
|
||||
Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```perl
|
||||
use Data::Dumper;
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
||||
my $body = WWW::SwaggerClient::Object::string->new(); # string | Pet object in the form of byte array
|
||||
|
||||
eval {
|
||||
$api_instance->add_pet_using_byte_array(body => $body);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling PetApi->add_pet_using_byte_array: $@\n";
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **string**| Pet object in the form of byte array | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -106,10 +155,10 @@ void (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -128,7 +177,7 @@ use Data::Dumper;
|
||||
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
||||
my $status = (); # ARRAY[string] | Status values that need to be considered for filter
|
||||
my $status = (); # ARRAY[string] | Status values that need to be considered for query
|
||||
|
||||
eval {
|
||||
my $result = $api_instance->find_pets_by_status(status => $status);
|
||||
@@ -143,7 +192,7 @@ if ($@) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**ARRAY[string]**](string.md)| Status values that need to be considered for filter |
|
||||
**status** | [**ARRAY[string]**](string.md)| Status values that need to be considered for query | [optional] [default to available]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -153,10 +202,10 @@ Name | Type | Description | Notes
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -165,7 +214,7 @@ Name | Type | Description | Notes
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
### Example
|
||||
```perl
|
||||
@@ -190,7 +239,7 @@ if ($@) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**ARRAY[string]**](string.md)| Tags to filter by |
|
||||
**tags** | [**ARRAY[string]**](string.md)| Tags to filter by | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -200,10 +249,10 @@ Name | Type | Description | Notes
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -212,7 +261,7 @@ Name | Type | Description | Notes
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a single pet
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
### Example
|
||||
```perl
|
||||
@@ -222,9 +271,11 @@ use Data::Dumper;
|
||||
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
|
||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
||||
my $pet_id = 789; # int | ID of pet to return
|
||||
my $pet_id = 789; # int | ID of pet that needs to be fetched
|
||||
|
||||
eval {
|
||||
my $result = $api_instance->get_pet_by_id(pet_id => $pet_id);
|
||||
@@ -239,7 +290,7 @@ if ($@) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet to return |
|
||||
**pet_id** | **int**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -247,12 +298,114 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **get_pet_by_id_in_object**
|
||||
> InlineResponse200 get_pet_by_id_in_object(pet_id => $pet_id)
|
||||
|
||||
Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
### Example
|
||||
```perl
|
||||
use Data::Dumper;
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
|
||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
||||
my $pet_id = 789; # int | ID of pet that needs to be fetched
|
||||
|
||||
eval {
|
||||
my $result = $api_instance->get_pet_by_id_in_object(pet_id => $pet_id);
|
||||
print Dumper($result);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling PetApi->get_pet_by_id_in_object: $@\n";
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponse200**](InlineResponse200.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **pet_pet_idtesting_byte_arraytrue_get**
|
||||
> string pet_pet_idtesting_byte_arraytrue_get(pet_id => $pet_id)
|
||||
|
||||
Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
### Example
|
||||
```perl
|
||||
use Data::Dumper;
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
|
||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
||||
my $pet_id = 789; # int | ID of pet that needs to be fetched
|
||||
|
||||
eval {
|
||||
my $result = $api_instance->pet_pet_idtesting_byte_arraytrue_get(pet_id => $pet_id);
|
||||
print Dumper($result);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling PetApi->pet_pet_idtesting_byte_arraytrue_get: $@\n";
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
**string**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -285,7 +438,7 @@ if ($@) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -295,10 +448,10 @@ void (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -317,7 +470,7 @@ use Data::Dumper;
|
||||
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
||||
my $pet_id = 789; # int | ID of pet that needs to be updated
|
||||
my $pet_id = 'pet_id_example'; # string | ID of pet that needs to be updated
|
||||
my $name = 'name_example'; # string | Updated name of the pet
|
||||
my $status = 'status_example'; # string | Updated status of the pet
|
||||
|
||||
@@ -333,7 +486,7 @@ if ($@) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet that needs to be updated |
|
||||
**pet_id** | **string**| ID of pet that needs to be updated |
|
||||
**name** | **string**| Updated name of the pet | [optional]
|
||||
**status** | **string**| Updated status of the pet | [optional]
|
||||
|
||||
@@ -345,15 +498,15 @@ void (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **upload_file**
|
||||
> ApiResponse upload_file(pet_id => $pet_id, additional_metadata => $additional_metadata, file => $file)
|
||||
> upload_file(pet_id => $pet_id, additional_metadata => $additional_metadata, file => $file)
|
||||
|
||||
uploads an image
|
||||
|
||||
@@ -372,8 +525,7 @@ my $additional_metadata = 'additional_metadata_example'; # string | Additional d
|
||||
my $file = '/path/to/file.txt'; # File | file to upload
|
||||
|
||||
eval {
|
||||
my $result = $api_instance->upload_file(pet_id => $pet_id, additional_metadata => $additional_metadata, file => $file);
|
||||
print Dumper($result);
|
||||
$api_instance->upload_file(pet_id => $pet_id, additional_metadata => $additional_metadata, file => $file);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling PetApi->upload_file: $@\n";
|
||||
@@ -390,16 +542,16 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
[**find_orders_by_status**](StoreApi.md#find_orders_by_status) | **GET** /store/findByStatus | Finds orders by status
|
||||
[**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**get_inventory_in_object**](StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
|
||||
|
||||
@@ -51,10 +53,63 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **find_orders_by_status**
|
||||
> ARRAY[Order] find_orders_by_status(status => $status)
|
||||
|
||||
Finds orders by status
|
||||
|
||||
A single status value can be provided as a string
|
||||
|
||||
### Example
|
||||
```perl
|
||||
use Data::Dumper;
|
||||
|
||||
# Configure API key authorization: test_api_client_id
|
||||
$WWW::SwaggerClient::Configuration::api_key->{'x-test_api_client_id'} = 'YOUR_API_KEY';
|
||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_id'} = "BEARER";
|
||||
# Configure API key authorization: test_api_client_secret
|
||||
$WWW::SwaggerClient::Configuration::api_key->{'x-test_api_client_secret'} = 'YOUR_API_KEY';
|
||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_secret'} = "BEARER";
|
||||
|
||||
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
||||
my $status = 'status_example'; # string | Status value that needs to be considered for query
|
||||
|
||||
eval {
|
||||
my $result = $api_instance->find_orders_by_status(status => $status);
|
||||
print Dumper($result);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling StoreApi->find_orders_by_status: $@\n";
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | **string**| Status value that needs to be considered for query | [optional] [default to placed]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ARRAY[Order]**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -96,10 +151,55 @@ This endpoint does not need any parameter.
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **get_inventory_in_object**
|
||||
> object get_inventory_in_object()
|
||||
|
||||
Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
|
||||
Returns an arbitrary object which is actually a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
```perl
|
||||
use Data::Dumper;
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
|
||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
|
||||
|
||||
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
||||
|
||||
eval {
|
||||
my $result = $api_instance->get_inventory_in_object();
|
||||
print Dumper($result);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling StoreApi->get_inventory_in_object: $@\n";
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**object**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -114,8 +214,17 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
|
||||
```perl
|
||||
use Data::Dumper;
|
||||
|
||||
# Configure API key authorization: test_api_key_header
|
||||
$WWW::SwaggerClient::Configuration::api_key->{'test_api_key_header'} = 'YOUR_API_KEY';
|
||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'test_api_key_header'} = "BEARER";
|
||||
# Configure API key authorization: test_api_key_query
|
||||
$WWW::SwaggerClient::Configuration::api_key->{'test_api_key_query'} = 'YOUR_API_KEY';
|
||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'test_api_key_query'} = "BEARER";
|
||||
|
||||
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
||||
my $order_id = 789; # int | ID of pet that needs to be fetched
|
||||
my $order_id = 'order_id_example'; # string | ID of pet that needs to be fetched
|
||||
|
||||
eval {
|
||||
my $result = $api_instance->get_order_by_id(order_id => $order_id);
|
||||
@@ -130,7 +239,7 @@ if ($@) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**order_id** | **int**| ID of pet that needs to be fetched |
|
||||
**order_id** | **string**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -138,12 +247,12 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
[test_api_key_header](../README.md#test_api_key_header), [test_api_key_query](../README.md#test_api_key_query)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -158,6 +267,15 @@ Place an order for a pet
|
||||
```perl
|
||||
use Data::Dumper;
|
||||
|
||||
# Configure API key authorization: test_api_client_id
|
||||
$WWW::SwaggerClient::Configuration::api_key->{'x-test_api_client_id'} = 'YOUR_API_KEY';
|
||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_id'} = "BEARER";
|
||||
# Configure API key authorization: test_api_client_secret
|
||||
$WWW::SwaggerClient::Configuration::api_key->{'x-test_api_client_secret'} = 'YOUR_API_KEY';
|
||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_secret'} = "BEARER";
|
||||
|
||||
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
||||
my $body = WWW::SwaggerClient::Object::Order->new(); # Order | order placed for purchasing the pet
|
||||
|
||||
@@ -174,7 +292,7 @@ if ($@) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -182,12 +300,12 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -98,7 +98,7 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -141,7 +141,7 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -184,7 +184,7 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -228,7 +228,7 @@ Name | Type | Description | Notes
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -274,7 +274,7 @@ Name | Type | Description | Notes
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -313,7 +313,7 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -358,7 +358,7 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
@@ -132,7 +132,7 @@ Class | Method | HTTP request | Description
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorizatoin URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Scopes**:
|
||||
- **write:pets**: modify pets in your account
|
||||
- **read:pets**: read your pets
|
||||
|
||||
@@ -5,10 +5,13 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||
[**addPetUsingByteArray**](PetApi.md#addPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**getPetByIdInObject**](PetApi.md#getPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
[**petPetIdtestingByteArraytrueGet**](PetApi.md#petPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
@@ -44,7 +47,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**\Swagger\Client\Model\Pet**](\Swagger\Client\Model\Pet.md)| Pet object that needs to be added to the store |
|
||||
**body** | [**\Swagger\Client\Model\Pet**](\Swagger\Client\Model\Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -54,10 +57,57 @@ void (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **addPetUsingByteArray**
|
||||
> addPetUsingByteArray($body)
|
||||
|
||||
Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
||||
|
||||
$api_instance = new Swagger\Client\Api\PetApi();
|
||||
$body = "B"; // string | Pet object in the form of byte array
|
||||
|
||||
try {
|
||||
$api_instance->addPetUsingByteArray($body);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PetApi->addPetUsingByteArray: ', $e->getMessage(), "\n";
|
||||
}
|
||||
?>
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **string**| Pet object in the form of byte array | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -103,10 +153,10 @@ void (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -126,7 +176,7 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
||||
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
||||
|
||||
$api_instance = new Swagger\Client\Api\PetApi();
|
||||
$status = array("status_example"); // string[] | Status values that need to be considered for filter
|
||||
$status = array("available"); // string[] | Status values that need to be considered for query
|
||||
|
||||
try {
|
||||
$result = $api_instance->findPetsByStatus($status);
|
||||
@@ -141,7 +191,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**string[]**](string.md)| Status values that need to be considered for filter |
|
||||
**status** | [**string[]**](string.md)| Status values that need to be considered for query | [optional] [default to available]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -151,10 +201,10 @@ Name | Type | Description | Notes
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -163,7 +213,7 @@ Name | Type | Description | Notes
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
### Example
|
||||
```php
|
||||
@@ -189,7 +239,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**string[]**](string.md)| Tags to filter by |
|
||||
**tags** | [**string[]**](string.md)| Tags to filter by | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -199,10 +249,10 @@ Name | Type | Description | Notes
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -211,7 +261,7 @@ Name | Type | Description | Notes
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a single pet
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
### Example
|
||||
```php
|
||||
@@ -222,9 +272,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
||||
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER');
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
||||
|
||||
$api_instance = new Swagger\Client\Api\PetApi();
|
||||
$pet_id = 789; // int | ID of pet to return
|
||||
$pet_id = 789; // int | ID of pet that needs to be fetched
|
||||
|
||||
try {
|
||||
$result = $api_instance->getPetById($pet_id);
|
||||
@@ -239,7 +291,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet to return |
|
||||
**pet_id** | **int**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -247,12 +299,116 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **getPetByIdInObject**
|
||||
> \Swagger\Client\Model\InlineResponse200 getPetByIdInObject($pet_id)
|
||||
|
||||
Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
### Example
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER');
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
||||
|
||||
$api_instance = new Swagger\Client\Api\PetApi();
|
||||
$pet_id = 789; // int | ID of pet that needs to be fetched
|
||||
|
||||
try {
|
||||
$result = $api_instance->getPetByIdInObject($pet_id);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PetApi->getPetByIdInObject: ', $e->getMessage(), "\n";
|
||||
}
|
||||
?>
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\Swagger\Client\Model\InlineResponse200**](InlineResponse200.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **petPetIdtestingByteArraytrueGet**
|
||||
> string petPetIdtestingByteArraytrueGet($pet_id)
|
||||
|
||||
Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
### Example
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER');
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
||||
|
||||
$api_instance = new Swagger\Client\Api\PetApi();
|
||||
$pet_id = 789; // int | ID of pet that needs to be fetched
|
||||
|
||||
try {
|
||||
$result = $api_instance->petPetIdtestingByteArraytrueGet($pet_id);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PetApi->petPetIdtestingByteArraytrueGet: ', $e->getMessage(), "\n";
|
||||
}
|
||||
?>
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
**string**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -286,7 +442,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**\Swagger\Client\Model\Pet**](\Swagger\Client\Model\Pet.md)| Pet object that needs to be added to the store |
|
||||
**body** | [**\Swagger\Client\Model\Pet**](\Swagger\Client\Model\Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -296,10 +452,10 @@ void (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -319,7 +475,7 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
||||
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
||||
|
||||
$api_instance = new Swagger\Client\Api\PetApi();
|
||||
$pet_id = 789; // int | ID of pet that needs to be updated
|
||||
$pet_id = "pet_id_example"; // string | ID of pet that needs to be updated
|
||||
$name = "name_example"; // string | Updated name of the pet
|
||||
$status = "status_example"; // string | Updated status of the pet
|
||||
|
||||
@@ -335,7 +491,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet that needs to be updated |
|
||||
**pet_id** | **string**| ID of pet that needs to be updated |
|
||||
**name** | **string**| Updated name of the pet | [optional]
|
||||
**status** | **string**| Updated status of the pet | [optional]
|
||||
|
||||
@@ -347,15 +503,15 @@ void (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **uploadFile**
|
||||
> \Swagger\Client\Model\ApiResponse uploadFile($pet_id, $additional_metadata, $file)
|
||||
> uploadFile($pet_id, $additional_metadata, $file)
|
||||
|
||||
uploads an image
|
||||
|
||||
@@ -375,8 +531,7 @@ $additional_metadata = "additional_metadata_example"; // string | Additional dat
|
||||
$file = "/path/to/file.txt"; // \SplFileObject | file to upload
|
||||
|
||||
try {
|
||||
$result = $api_instance->uploadFile($pet_id, $additional_metadata, $file);
|
||||
print_r($result);
|
||||
$api_instance->uploadFile($pet_id, $additional_metadata, $file);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PetApi->uploadFile: ', $e->getMessage(), "\n";
|
||||
}
|
||||
@@ -393,16 +548,16 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
[**\Swagger\Client\Model\ApiResponse**](ApiResponse.md)
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -5,7 +5,9 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
[**findOrdersByStatus**](StoreApi.md#findOrdersByStatus) | **GET** /store/findByStatus | Finds orders by status
|
||||
[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**getInventoryInObject**](StoreApi.md#getInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||
|
||||
@@ -47,10 +49,64 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **findOrdersByStatus**
|
||||
> \Swagger\Client\Model\Order[] findOrdersByStatus($status)
|
||||
|
||||
Finds orders by status
|
||||
|
||||
A single status value can be provided as a string
|
||||
|
||||
### Example
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
// Configure API key authorization: test_api_client_id
|
||||
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('x-test_api_client_id', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-test_api_client_id', 'BEARER');
|
||||
// Configure API key authorization: test_api_client_secret
|
||||
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('x-test_api_client_secret', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-test_api_client_secret', 'BEARER');
|
||||
|
||||
$api_instance = new Swagger\Client\Api\StoreApi();
|
||||
$status = "placed"; // string | Status value that needs to be considered for query
|
||||
|
||||
try {
|
||||
$result = $api_instance->findOrdersByStatus($status);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling StoreApi->findOrdersByStatus: ', $e->getMessage(), "\n";
|
||||
}
|
||||
?>
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | **string**| Status value that needs to be considered for query | [optional] [default to placed]
|
||||
|
||||
### Return type
|
||||
|
||||
[**\Swagger\Client\Model\Order[]**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -93,10 +149,56 @@ This endpoint does not need any parameter.
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **getInventoryInObject**
|
||||
> object getInventoryInObject()
|
||||
|
||||
Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
|
||||
Returns an arbitrary object which is actually a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER');
|
||||
|
||||
$api_instance = new Swagger\Client\Api\StoreApi();
|
||||
|
||||
try {
|
||||
$result = $api_instance->getInventoryInObject();
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling StoreApi->getInventoryInObject: ', $e->getMessage(), "\n";
|
||||
}
|
||||
?>
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**object**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -112,8 +214,17 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
// Configure API key authorization: test_api_key_header
|
||||
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('test_api_key_header', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('test_api_key_header', 'BEARER');
|
||||
// Configure API key authorization: test_api_key_query
|
||||
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('test_api_key_query', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('test_api_key_query', 'BEARER');
|
||||
|
||||
$api_instance = new Swagger\Client\Api\StoreApi();
|
||||
$order_id = 789; // int | ID of pet that needs to be fetched
|
||||
$order_id = "order_id_example"; // string | ID of pet that needs to be fetched
|
||||
|
||||
try {
|
||||
$result = $api_instance->getOrderById($order_id);
|
||||
@@ -128,7 +239,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**order_id** | **int**| ID of pet that needs to be fetched |
|
||||
**order_id** | **string**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -136,12 +247,12 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
[test_api_key_header](../README.md#test_api_key_header), [test_api_key_query](../README.md#test_api_key_query)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -157,6 +268,15 @@ Place an order for a pet
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
// Configure API key authorization: test_api_client_id
|
||||
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('x-test_api_client_id', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-test_api_client_id', 'BEARER');
|
||||
// Configure API key authorization: test_api_client_secret
|
||||
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('x-test_api_client_secret', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-test_api_client_secret', 'BEARER');
|
||||
|
||||
$api_instance = new Swagger\Client\Api\StoreApi();
|
||||
$body = new \Swagger\Client\Model\Order(); // \Swagger\Client\Model\Order | order placed for purchasing the pet
|
||||
|
||||
@@ -173,7 +293,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**\Swagger\Client\Model\Order**](\Swagger\Client\Model\Order.md)| order placed for purchasing the pet |
|
||||
**body** | [**\Swagger\Client\Model\Order**](\Swagger\Client\Model\Order.md)| order placed for purchasing the pet | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -181,12 +301,12 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -95,7 +95,7 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -139,7 +139,7 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -183,7 +183,7 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -228,7 +228,7 @@ Name | Type | Description | Notes
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -275,7 +275,7 @@ Name | Type | Description | Notes
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -315,7 +315,7 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -361,7 +361,7 @@ void (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
@@ -124,7 +124,7 @@ Class | Method | HTTP request | Description
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorizatoin URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Scopes**:
|
||||
- **write:pets**: modify pets in your account
|
||||
- **read:pets**: read your pets
|
||||
|
||||
@@ -5,17 +5,20 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
|
||||
[**add_pet_using_byte_array**](PetApi.md#add_pet_using_byte_array) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
[**delete_pet**](PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**find_pets_by_status**](PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**get_pet_by_id**](PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**get_pet_by_id_in_object**](PetApi.md#get_pet_by_id_in_object) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
[**pet_pet_idtesting_byte_arraytrue_get**](PetApi.md#pet_pet_idtesting_byte_arraytrue_get) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
[**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
|
||||
[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
|
||||
|
||||
# **add_pet**
|
||||
> add_pet(body)
|
||||
> add_pet(body=body)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
@@ -33,11 +36,11 @@ swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.PetApi()
|
||||
body = swagger_client.Pet() # Pet | Pet object that needs to be added to the store
|
||||
body = swagger_client.Pet() # Pet | Pet object that needs to be added to the store (optional)
|
||||
|
||||
try:
|
||||
# Add a new pet to the store
|
||||
api_instance.add_pet(body)
|
||||
api_instance.add_pet(body=body)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->add_pet: %s\n" % e
|
||||
```
|
||||
@@ -46,7 +49,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -59,7 +62,56 @@ void (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **add_pet_using_byte_array**
|
||||
> add_pet_using_byte_array(body=body)
|
||||
|
||||
Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.PetApi()
|
||||
body = 'B' # str | Pet object in the form of byte array (optional)
|
||||
|
||||
try:
|
||||
# Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
api_instance.add_pet_using_byte_array(body=body)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->add_pet_using_byte_array: %s\n" % e
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **str**| Pet object in the form of byte array | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -110,12 +162,12 @@ void (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **find_pets_by_status**
|
||||
> list[Pet] find_pets_by_status(status)
|
||||
> list[Pet] find_pets_by_status(status=status)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
@@ -133,11 +185,11 @@ swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.PetApi()
|
||||
status = ['status_example'] # list[str] | Status values that need to be considered for filter
|
||||
status = ['available'] # list[str] | Status values that need to be considered for query (optional) (default to available)
|
||||
|
||||
try:
|
||||
# Finds Pets by status
|
||||
api_response = api_instance.find_pets_by_status(status)
|
||||
api_response = api_instance.find_pets_by_status(status=status)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->find_pets_by_status: %s\n" % e
|
||||
@@ -147,7 +199,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**list[str]**](str.md)| Status values that need to be considered for filter |
|
||||
**status** | [**list[str]**](str.md)| Status values that need to be considered for query | [optional] [default to available]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -160,16 +212,16 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **find_pets_by_tags**
|
||||
> list[Pet] find_pets_by_tags(tags)
|
||||
> list[Pet] find_pets_by_tags(tags=tags)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
### Example
|
||||
```python
|
||||
@@ -183,11 +235,11 @@ swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.PetApi()
|
||||
tags = ['tags_example'] # list[str] | Tags to filter by
|
||||
tags = ['tags_example'] # list[str] | Tags to filter by (optional)
|
||||
|
||||
try:
|
||||
# Finds Pets by tags
|
||||
api_response = api_instance.find_pets_by_tags(tags)
|
||||
api_response = api_instance.find_pets_by_tags(tags=tags)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->find_pets_by_tags: %s\n" % e
|
||||
@@ -197,7 +249,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**list[str]**](str.md)| Tags to filter by |
|
||||
**tags** | [**list[str]**](str.md)| Tags to filter by | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -210,7 +262,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -219,7 +271,7 @@ Name | Type | Description | Notes
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a single pet
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
### Example
|
||||
```python
|
||||
@@ -232,10 +284,12 @@ from pprint import pprint
|
||||
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.PetApi()
|
||||
pet_id = 789 # int | ID of pet to return
|
||||
pet_id = 789 # int | ID of pet that needs to be fetched
|
||||
|
||||
try:
|
||||
# Find pet by ID
|
||||
@@ -249,7 +303,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet to return |
|
||||
**pet_id** | **int**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -257,17 +311,125 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **get_pet_by_id_in_object**
|
||||
> InlineResponse200 get_pet_by_id_in_object(pet_id)
|
||||
|
||||
Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.PetApi()
|
||||
pet_id = 789 # int | ID of pet that needs to be fetched
|
||||
|
||||
try:
|
||||
# Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
api_response = api_instance.get_pet_by_id_in_object(pet_id)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->get_pet_by_id_in_object: %s\n" % e
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponse200**](InlineResponse200.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **pet_pet_idtesting_byte_arraytrue_get**
|
||||
> str pet_pet_idtesting_byte_arraytrue_get(pet_id)
|
||||
|
||||
Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.PetApi()
|
||||
pet_id = 789 # int | ID of pet that needs to be fetched
|
||||
|
||||
try:
|
||||
# Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
api_response = api_instance.pet_pet_idtesting_byte_arraytrue_get(pet_id)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->pet_pet_idtesting_byte_arraytrue_get: %s\n" % e
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
**str**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **update_pet**
|
||||
> update_pet(body)
|
||||
> update_pet(body=body)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
@@ -285,11 +447,11 @@ swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.PetApi()
|
||||
body = swagger_client.Pet() # Pet | Pet object that needs to be added to the store
|
||||
body = swagger_client.Pet() # Pet | Pet object that needs to be added to the store (optional)
|
||||
|
||||
try:
|
||||
# Update an existing pet
|
||||
api_instance.update_pet(body)
|
||||
api_instance.update_pet(body=body)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->update_pet: %s\n" % e
|
||||
```
|
||||
@@ -298,7 +460,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -311,7 +473,7 @@ void (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -334,7 +496,7 @@ swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.PetApi()
|
||||
pet_id = 789 # int | ID of pet that needs to be updated
|
||||
pet_id = 'pet_id_example' # str | ID of pet that needs to be updated
|
||||
name = 'name_example' # str | Updated name of the pet (optional)
|
||||
status = 'status_example' # str | Updated status of the pet (optional)
|
||||
|
||||
@@ -349,7 +511,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet that needs to be updated |
|
||||
**pet_id** | **str**| ID of pet that needs to be updated |
|
||||
**name** | **str**| Updated name of the pet | [optional]
|
||||
**status** | **str**| Updated status of the pet | [optional]
|
||||
|
||||
@@ -364,12 +526,12 @@ void (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **upload_file**
|
||||
> ApiResponse upload_file(pet_id, additional_metadata=additional_metadata, file=file)
|
||||
> upload_file(pet_id, additional_metadata=additional_metadata, file=file)
|
||||
|
||||
uploads an image
|
||||
|
||||
@@ -393,8 +555,7 @@ file = '/path/to/file.txt' # file | file to upload (optional)
|
||||
|
||||
try:
|
||||
# uploads an image
|
||||
api_response = api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file)
|
||||
pprint(api_response)
|
||||
api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file)
|
||||
except ApiException as e:
|
||||
print "Exception when calling PetApi->upload_file: %s\n" % e
|
||||
```
|
||||
@@ -409,7 +570,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
@@ -418,7 +579,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -5,7 +5,9 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
[**find_orders_by_status**](StoreApi.md#find_orders_by_status) | **GET** /store/findByStatus | Finds orders by status
|
||||
[**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**get_inventory_in_object**](StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
|
||||
|
||||
@@ -52,7 +54,63 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **find_orders_by_status**
|
||||
> list[Order] find_orders_by_status(status=status)
|
||||
|
||||
Finds orders by status
|
||||
|
||||
A single status value can be provided as a string
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure API key authorization: test_api_client_id
|
||||
swagger_client.configuration.api_key['x-test_api_client_id'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['x-test_api_client_id'] = 'BEARER'
|
||||
# Configure API key authorization: test_api_client_secret
|
||||
swagger_client.configuration.api_key['x-test_api_client_secret'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['x-test_api_client_secret'] = 'BEARER'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.StoreApi()
|
||||
status = 'placed' # str | Status value that needs to be considered for query (optional) (default to placed)
|
||||
|
||||
try:
|
||||
# Finds orders by status
|
||||
api_response = api_instance.find_orders_by_status(status=status)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling StoreApi->find_orders_by_status: %s\n" % e
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | **str**| Status value that needs to be considered for query | [optional] [default to placed]
|
||||
|
||||
### Return type
|
||||
|
||||
[**list[Order]**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -100,7 +158,55 @@ This endpoint does not need any parameter.
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **get_inventory_in_object**
|
||||
> object get_inventory_in_object()
|
||||
|
||||
Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
|
||||
Returns an arbitrary object which is actually a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.StoreApi()
|
||||
|
||||
try:
|
||||
# Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
api_response = api_instance.get_inventory_in_object()
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling StoreApi->get_inventory_in_object: %s\n" % e
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**object**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -118,9 +224,18 @@ import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure API key authorization: test_api_key_header
|
||||
swagger_client.configuration.api_key['test_api_key_header'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['test_api_key_header'] = 'BEARER'
|
||||
# Configure API key authorization: test_api_key_query
|
||||
swagger_client.configuration.api_key['test_api_key_query'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['test_api_key_query'] = 'BEARER'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.StoreApi()
|
||||
order_id = 789 # int | ID of pet that needs to be fetched
|
||||
order_id = 'order_id_example' # str | ID of pet that needs to be fetched
|
||||
|
||||
try:
|
||||
# Find purchase order by ID
|
||||
@@ -134,7 +249,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**order_id** | **int**| ID of pet that needs to be fetched |
|
||||
**order_id** | **str**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -142,17 +257,17 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
[test_api_key_header](../README.md#test_api_key_header), [test_api_key_query](../README.md#test_api_key_query)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **place_order**
|
||||
> Order place_order(body)
|
||||
> Order place_order(body=body)
|
||||
|
||||
Place an order for a pet
|
||||
|
||||
@@ -165,13 +280,22 @@ import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure API key authorization: test_api_client_id
|
||||
swagger_client.configuration.api_key['x-test_api_client_id'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['x-test_api_client_id'] = 'BEARER'
|
||||
# Configure API key authorization: test_api_client_secret
|
||||
swagger_client.configuration.api_key['x-test_api_client_secret'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
# swagger_client.configuration.api_key_prefix['x-test_api_client_secret'] = 'BEARER'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.StoreApi()
|
||||
body = swagger_client.Order() # Order | order placed for purchasing the pet
|
||||
body = swagger_client.Order() # Order | order placed for purchasing the pet (optional)
|
||||
|
||||
try:
|
||||
# Place an order for a pet
|
||||
api_response = api_instance.place_order(body)
|
||||
api_response = api_instance.place_order(body=body)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling StoreApi->place_order: %s\n" % e
|
||||
@@ -181,7 +305,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -189,12 +313,12 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -5,17 +5,20 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
|
||||
[**add_pet_using_byte_array**](PetApi.md#add_pet_using_byte_array) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
[**delete_pet**](PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**find_pets_by_status**](PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**get_pet_by_id**](PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**get_pet_by_id_in_object**](PetApi.md#get_pet_by_id_in_object) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
[**pet_pet_idtesting_byte_arraytrue_get**](PetApi.md#pet_pet_idtesting_byte_arraytrue_get) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
[**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
|
||||
[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
|
||||
|
||||
# **add_pet**
|
||||
> add_pet(body)
|
||||
> add_pet(opts)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
@@ -33,12 +36,13 @@ end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
|
||||
body = Petstore::Pet.new # Pet | Pet object that needs to be added to the store
|
||||
|
||||
opts = {
|
||||
body: Petstore::Pet.new # Pet | Pet object that needs to be added to the store
|
||||
}
|
||||
|
||||
begin
|
||||
#Add a new pet to the store
|
||||
api_instance.add_pet(body)
|
||||
api_instance.add_pet(opts)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->add_pet: #{e}"
|
||||
end
|
||||
@@ -48,7 +52,7 @@ end
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -58,10 +62,62 @@ nil (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
|
||||
|
||||
# **add_pet_using_byte_array**
|
||||
> add_pet_using_byte_array(opts)
|
||||
|
||||
Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
# setup authorization
|
||||
Petstore.configure do |config|
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
config.access_token = 'YOUR ACCESS TOKEN'
|
||||
end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
|
||||
opts = {
|
||||
body: "B" # String | Pet object in the form of byte array
|
||||
}
|
||||
|
||||
begin
|
||||
#Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
api_instance.add_pet_using_byte_array(opts)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->add_pet_using_byte_array: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **String**| Pet object in the form of byte array | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
|
||||
|
||||
@@ -113,15 +169,15 @@ nil (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
|
||||
|
||||
# **find_pets_by_status**
|
||||
> Array<Pet> find_pets_by_status(status)
|
||||
> Array<Pet> find_pets_by_status(opts)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
@@ -139,12 +195,13 @@ end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
|
||||
status = ["status_example"] # Array<String> | Status values that need to be considered for filter
|
||||
|
||||
opts = {
|
||||
status: ["available"] # Array<String> | Status values that need to be considered for query
|
||||
}
|
||||
|
||||
begin
|
||||
#Finds Pets by status
|
||||
result = api_instance.find_pets_by_status(status)
|
||||
result = api_instance.find_pets_by_status(opts)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->find_pets_by_status: #{e}"
|
||||
@@ -155,7 +212,7 @@ end
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**Array<String>**](String.md)| Status values that need to be considered for filter |
|
||||
**status** | [**Array<String>**](String.md)| Status values that need to be considered for query | [optional] [default to available]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -165,19 +222,19 @@ Name | Type | Description | Notes
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
|
||||
|
||||
# **find_pets_by_tags**
|
||||
> Array<Pet> find_pets_by_tags(tags)
|
||||
> Array<Pet> find_pets_by_tags(opts)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
@@ -191,12 +248,13 @@ end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
|
||||
tags = ["tags_example"] # Array<String> | Tags to filter by
|
||||
|
||||
opts = {
|
||||
tags: ["tags_example"] # Array<String> | Tags to filter by
|
||||
}
|
||||
|
||||
begin
|
||||
#Finds Pets by tags
|
||||
result = api_instance.find_pets_by_tags(tags)
|
||||
result = api_instance.find_pets_by_tags(opts)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->find_pets_by_tags: #{e}"
|
||||
@@ -207,7 +265,7 @@ end
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**Array<String>**](String.md)| Tags to filter by |
|
||||
**tags** | [**Array<String>**](String.md)| Tags to filter by | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -217,10 +275,10 @@ Name | Type | Description | Notes
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
|
||||
|
||||
@@ -229,7 +287,7 @@ Name | Type | Description | Notes
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a single pet
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
@@ -241,11 +299,14 @@ Petstore.configure do |config|
|
||||
config.api_key['api_key'] = 'YOUR API KEY'
|
||||
# Uncomment the following line to set a prefix for the API key, e.g. 'BEARER' (defaults to nil)
|
||||
#config.api_key_prefix['api_key'] = 'BEARER'
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
config.access_token = 'YOUR ACCESS TOKEN'
|
||||
end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
|
||||
pet_id = 789 # Integer | ID of pet to return
|
||||
pet_id = 789 # Integer | ID of pet that needs to be fetched
|
||||
|
||||
|
||||
begin
|
||||
@@ -261,7 +322,7 @@ end
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **Integer**| ID of pet to return |
|
||||
**pet_id** | **Integer**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -269,17 +330,131 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
|
||||
|
||||
# **get_pet_by_id_in_object**
|
||||
> InlineResponse200 get_pet_by_id_in_object(pet_id)
|
||||
|
||||
Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
# setup authorization
|
||||
Petstore.configure do |config|
|
||||
# Configure API key authorization: api_key
|
||||
config.api_key['api_key'] = 'YOUR API KEY'
|
||||
# Uncomment the following line to set a prefix for the API key, e.g. 'BEARER' (defaults to nil)
|
||||
#config.api_key_prefix['api_key'] = 'BEARER'
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
config.access_token = 'YOUR ACCESS TOKEN'
|
||||
end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
|
||||
pet_id = 789 # Integer | ID of pet that needs to be fetched
|
||||
|
||||
|
||||
begin
|
||||
#Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
result = api_instance.get_pet_by_id_in_object(pet_id)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->get_pet_by_id_in_object: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **Integer**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponse200**](InlineResponse200.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
|
||||
|
||||
# **pet_pet_idtesting_byte_arraytrue_get**
|
||||
> String pet_pet_idtesting_byte_arraytrue_get(pet_id)
|
||||
|
||||
Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
# setup authorization
|
||||
Petstore.configure do |config|
|
||||
# Configure API key authorization: api_key
|
||||
config.api_key['api_key'] = 'YOUR API KEY'
|
||||
# Uncomment the following line to set a prefix for the API key, e.g. 'BEARER' (defaults to nil)
|
||||
#config.api_key_prefix['api_key'] = 'BEARER'
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
config.access_token = 'YOUR ACCESS TOKEN'
|
||||
end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
|
||||
pet_id = 789 # Integer | ID of pet that needs to be fetched
|
||||
|
||||
|
||||
begin
|
||||
#Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
result = api_instance.pet_pet_idtesting_byte_arraytrue_get(pet_id)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->pet_pet_idtesting_byte_arraytrue_get: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **Integer**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
**String**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
|
||||
|
||||
# **update_pet**
|
||||
> update_pet(body)
|
||||
> update_pet(opts)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
@@ -297,12 +472,13 @@ end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
|
||||
body = Petstore::Pet.new # Pet | Pet object that needs to be added to the store
|
||||
|
||||
opts = {
|
||||
body: Petstore::Pet.new # Pet | Pet object that needs to be added to the store
|
||||
}
|
||||
|
||||
begin
|
||||
#Update an existing pet
|
||||
api_instance.update_pet(body)
|
||||
api_instance.update_pet(opts)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->update_pet: #{e}"
|
||||
end
|
||||
@@ -312,7 +488,7 @@ end
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -322,10 +498,10 @@ nil (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
|
||||
|
||||
@@ -348,7 +524,7 @@ end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
|
||||
pet_id = 789 # Integer | ID of pet that needs to be updated
|
||||
pet_id = "pet_id_example" # String | ID of pet that needs to be updated
|
||||
|
||||
opts = {
|
||||
name: "name_example", # String | Updated name of the pet
|
||||
@@ -367,7 +543,7 @@ end
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **Integer**| ID of pet that needs to be updated |
|
||||
**pet_id** | **String**| ID of pet that needs to be updated |
|
||||
**name** | **String**| Updated name of the pet | [optional]
|
||||
**status** | **String**| Updated status of the pet | [optional]
|
||||
|
||||
@@ -379,15 +555,15 @@ nil (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
|
||||
|
||||
# **upload_file**
|
||||
> ApiResponse upload_file(pet_id, opts)
|
||||
> upload_file(pet_id, opts)
|
||||
|
||||
uploads an image
|
||||
|
||||
@@ -414,8 +590,7 @@ opts = {
|
||||
|
||||
begin
|
||||
#uploads an image
|
||||
result = api_instance.upload_file(pet_id, opts)
|
||||
p result
|
||||
api_instance.upload_file(pet_id, opts)
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->upload_file: #{e}"
|
||||
end
|
||||
@@ -431,16 +606,16 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
nil (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,9 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
[**find_orders_by_status**](StoreApi.md#find_orders_by_status) | **GET** /store/findByStatus | Finds orders by status
|
||||
[**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**get_inventory_in_object**](StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
|
||||
|
||||
@@ -49,10 +51,70 @@ nil (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
|
||||
|
||||
# **find_orders_by_status**
|
||||
> Array<Order> find_orders_by_status(opts)
|
||||
|
||||
Finds orders by status
|
||||
|
||||
A single status value can be provided as a string
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
# setup authorization
|
||||
Petstore.configure do |config|
|
||||
# Configure API key authorization: test_api_client_id
|
||||
config.api_key['x-test_api_client_id'] = 'YOUR API KEY'
|
||||
# Uncomment the following line to set a prefix for the API key, e.g. 'BEARER' (defaults to nil)
|
||||
#config.api_key_prefix['x-test_api_client_id'] = 'BEARER'
|
||||
|
||||
# Configure API key authorization: test_api_client_secret
|
||||
config.api_key['x-test_api_client_secret'] = 'YOUR API KEY'
|
||||
# Uncomment the following line to set a prefix for the API key, e.g. 'BEARER' (defaults to nil)
|
||||
#config.api_key_prefix['x-test_api_client_secret'] = 'BEARER'
|
||||
end
|
||||
|
||||
api_instance = Petstore::StoreApi.new
|
||||
|
||||
opts = {
|
||||
status: "placed" # String | Status value that needs to be considered for query
|
||||
}
|
||||
|
||||
begin
|
||||
#Finds orders by status
|
||||
result = api_instance.find_orders_by_status(opts)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling StoreApi->find_orders_by_status: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | **String**| Status value that needs to be considered for query | [optional] [default to placed]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Array<Order>**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
|
||||
|
||||
@@ -97,10 +159,58 @@ This endpoint does not need any parameter.
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
|
||||
|
||||
# **get_inventory_in_object**
|
||||
> Object get_inventory_in_object
|
||||
|
||||
Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
|
||||
Returns an arbitrary object which is actually a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
# setup authorization
|
||||
Petstore.configure do |config|
|
||||
# Configure API key authorization: api_key
|
||||
config.api_key['api_key'] = 'YOUR API KEY'
|
||||
# Uncomment the following line to set a prefix for the API key, e.g. 'BEARER' (defaults to nil)
|
||||
#config.api_key_prefix['api_key'] = 'BEARER'
|
||||
end
|
||||
|
||||
api_instance = Petstore::StoreApi.new
|
||||
|
||||
begin
|
||||
#Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
result = api_instance.get_inventory_in_object
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling StoreApi->get_inventory_in_object: #{e}"
|
||||
end
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**Object**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
|
||||
|
||||
@@ -115,10 +225,22 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
# setup authorization
|
||||
Petstore.configure do |config|
|
||||
# Configure API key authorization: test_api_key_header
|
||||
config.api_key['test_api_key_header'] = 'YOUR API KEY'
|
||||
# Uncomment the following line to set a prefix for the API key, e.g. 'BEARER' (defaults to nil)
|
||||
#config.api_key_prefix['test_api_key_header'] = 'BEARER'
|
||||
|
||||
# Configure API key authorization: test_api_key_query
|
||||
config.api_key['test_api_key_query'] = 'YOUR API KEY'
|
||||
# Uncomment the following line to set a prefix for the API key, e.g. 'BEARER' (defaults to nil)
|
||||
#config.api_key_prefix['test_api_key_query'] = 'BEARER'
|
||||
end
|
||||
|
||||
api_instance = Petstore::StoreApi.new
|
||||
|
||||
order_id = 789 # Integer | ID of pet that needs to be fetched
|
||||
order_id = "order_id_example" # String | ID of pet that needs to be fetched
|
||||
|
||||
|
||||
begin
|
||||
@@ -134,7 +256,7 @@ end
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**order_id** | **Integer**| ID of pet that needs to be fetched |
|
||||
**order_id** | **String**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -142,17 +264,17 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
[test_api_key_header](../README.md#test_api_key_header), [test_api_key_query](../README.md#test_api_key_query)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
|
||||
|
||||
# **place_order**
|
||||
> Order place_order(body)
|
||||
> Order place_order(opts)
|
||||
|
||||
Place an order for a pet
|
||||
|
||||
@@ -162,15 +284,28 @@ Place an order for a pet
|
||||
```ruby
|
||||
# load the gem
|
||||
require 'petstore'
|
||||
# setup authorization
|
||||
Petstore.configure do |config|
|
||||
# Configure API key authorization: test_api_client_id
|
||||
config.api_key['x-test_api_client_id'] = 'YOUR API KEY'
|
||||
# Uncomment the following line to set a prefix for the API key, e.g. 'BEARER' (defaults to nil)
|
||||
#config.api_key_prefix['x-test_api_client_id'] = 'BEARER'
|
||||
|
||||
# Configure API key authorization: test_api_client_secret
|
||||
config.api_key['x-test_api_client_secret'] = 'YOUR API KEY'
|
||||
# Uncomment the following line to set a prefix for the API key, e.g. 'BEARER' (defaults to nil)
|
||||
#config.api_key_prefix['x-test_api_client_secret'] = 'BEARER'
|
||||
end
|
||||
|
||||
api_instance = Petstore::StoreApi.new
|
||||
|
||||
body = Petstore::Order.new # Order | order placed for purchasing the pet
|
||||
|
||||
opts = {
|
||||
body: Petstore::Order.new # Order | order placed for purchasing the pet
|
||||
}
|
||||
|
||||
begin
|
||||
#Place an order for a pet
|
||||
result = api_instance.place_order(body)
|
||||
result = api_instance.place_order(opts)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling StoreApi->place_order: #{e}"
|
||||
@@ -181,7 +316,7 @@ end
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -189,12 +324,12 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ nil (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -99,7 +99,7 @@ nil (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -145,7 +145,7 @@ nil (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -191,7 +191,7 @@ nil (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -238,7 +238,7 @@ Name | Type | Description | Notes
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -288,7 +288,7 @@ Name | Type | Description | Notes
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -328,7 +328,7 @@ nil (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
@@ -377,7 +377,7 @@ nil (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
Reference in New Issue
Block a user