update csharp doc with minor enhancements and bug fixes

This commit is contained in:
wing328
2016-04-18 00:19:16 +08:00
parent 8c0cff57ba
commit cbccee9c39
28 changed files with 414 additions and 283 deletions
@@ -1,13 +1,13 @@
{{moduleName}} - the C# library for the {{appName}}
# {{packageName}} - the C# library for the {{appName}}
{{#appDescription}}
{{{appDescription}}}
{{{appDescription}}}
{{/appDescription}}
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
This C# SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API version: {{appVersion}}
- Package version: {{gemVersion}}
- SDK version: {{packageVersion}}
- Build date: {{generatedDate}}
- Build package: {{generatorClass}}
{{#infoUrl}}
@@ -15,8 +15,13 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
{{/infoUrl}}
## Frameworks supported
{{^supportUWP}}
- .NET 4.0 or later
- Windows Phone 7.1 (Mango)
{{/supportUWP}}
{{#supportUWP}}
- UWP
{{/supportUWP}}
## Dependencies
- [RestSharp] (https://www.nuget.org/packages/RestSharp) - 105.1.0 or later
@@ -32,50 +37,67 @@ NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploa
## Installation
Run the following command to generate the DLL
- [Mac/Linux] compile-mono.sh
- [Windows] compile.bat
- [Mac/Linux] `/bin/sh compile-mono.sh`
- [Windows] `compile.bat`
Then include the DLL (under the `bin` folder) in the C# project
Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces:
```csharp
using {{packageName}}.Api;
using {{packageName}}.Client;
{{#modelPackage}}
using {{{.}}};
{{/modelPackage}}
```
## Getting Started
```csharp
using System;
using System.Diagnostics;
using {{packageName}}.Api;
using {{packageName}}.Client;
using {{packageName}}.Module;
{{#modelPackage}}
using {{{.}}};
{{/modelPackage}}
namespace Example
{
public class {{operationId}}Example
{
public void main(){
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}}
// 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}}();
var apiInstance = new {{classname}}();
{{#allParams}}
{{#isPrimitiveType}}
var {{paramName}} = {{example}}; // {{{dataType}}} | {{{description}}}
{{/isPrimitiveType}}
{{^isPrimitiveType}}
var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}
{{/isPrimitiveType}}
{{#isPrimitiveType}}
var {{paramName}} = {{example}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
{{/isPrimitiveType}}
{{^isPrimitiveType}}
var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
{{/isPrimitiveType}}
{{/allParams}}
try {
{{#returnType}}{{returnType}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
try
{
{{#summary}}
// {{{.}}}
{{/summary}}
{{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
Debug.WriteLine(result);{{/returnType}}
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling {{classname}}.{{operationId}}: " + e.Message );
}
}
@@ -89,13 +111,18 @@ 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}}
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}}
{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
## Documentation for Models
{{#models}}{{#model}} - [{{classname}}]({{modelDocPath}}{{classname}}.md)
{{#modelPackage}}
{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}]({{modelDocPath}}{{{classname}}}.md)
{{/model}}{{/models}}
{{/modelPackage}}
{{^modelPackage}}
No model defined in this package
{{/modelPackage}}
## Documentation for Authorization
@@ -5,13 +5,13 @@ All URIs are relative to *{{basePath}}*
Method | HTTP request | Description
------------- | ------------- | -------------
{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}
{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}
{{/operation}}{{/operations}}
{{#operations}}
{{#operation}}
# **{{{operationId}}}**
> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
> {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
{{{summary}}}{{#notes}}
@@ -23,13 +23,14 @@ using System;
using System.Diagnostics;
using {{packageName}}.Api;
using {{packageName}}.Client;
using {{packageName}}.Module;
using {{packageName}}.Model;
namespace Example
{
public class {{operationId}}Example
{
public void main(){
public void main()
{
{{#hasAuthMethods}}{{#authMethods}}{{#isBasic}}
// Configure HTTP basic authorization: {{{name}}}
Configuration.Default.Username = 'YOUR_USERNAME';
@@ -45,17 +46,23 @@ namespace Example
var apiInstance = new {{classname}}();
{{#allParams}}
{{#isPrimitiveType}}
var {{paramName}} = {{example}}; // {{{dataType}}} | {{{description}}}
var {{paramName}} = {{example}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
{{/isPrimitiveType}}
{{^isPrimitiveType}}
var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}
var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
{{/isPrimitiveType}}
{{/allParams}}
try {
try
{
{{#summary}}
// {{{.}}}
{{/summary}}
{{#returnType}}{{returnType}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
Debug.WriteLine(result);{{/returnType}}
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling {{classname}}.{{operationId}}: " + e.Message );
}
}
@@ -67,7 +74,7 @@ namespace Example
{{^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}} **{{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
@@ -83,5 +90,7 @@ Name | Type | Description | Notes
- **Content-Type**: {{#consumes}}{{mediaType}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
- **Accept**: {{#produces}}{{mediaType}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}}
[[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)
{{/operation}}
{{/operations}}
@@ -1,5 +1,6 @@
{{#models}}{{#model}}# {{classname}}
{{#models}}
{{#model}}
# {{{packageName}}}.Model.{{{classname}}}
## Properties
Name | Type | Description | Notes
@@ -7,4 +8,7 @@ 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}}
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
{{/model}}
{{/models}}
@@ -33,7 +33,7 @@ Name | Type | Description | Notes
{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}}
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: {{#consumes}}{{mediaType}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
- **Accept**: {{#produces}}{{mediaType}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}}
@@ -73,7 +73,7 @@ namespace IO.Swagger.Test
{
// TODO: add unit test for the method 'DeletePet'
long? petId = null; // TODO: replace null with proper value
string apiKey = null; // TODO: replace null with proper value
string apiKey = null; // TODO: replace null with proper value
instance.DeletePet(petId, apiKey);
}
@@ -134,8 +134,8 @@ string apiKey = null; // TODO: replace null with proper value
{
// TODO: add unit test for the method 'UpdatePetWithForm'
long? petId = null; // TODO: replace null with proper value
string name = null; // TODO: replace null with proper value
string status = null; // TODO: replace null with proper value
string name = null; // TODO: replace null with proper value
string status = null; // TODO: replace null with proper value
instance.UpdatePetWithForm(petId, name, status);
}
@@ -148,8 +148,8 @@ string status = null; // TODO: replace null with proper value
{
// 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
Stream file = 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
var response = instance.UploadFile(petId, additionalMetadata, file);
Assert.IsInstanceOf<ApiResponse> (response, "response is ApiResponse");
}
@@ -72,7 +72,7 @@ namespace IO.Swagger.Test
public void GetInventoryTest()
{
// TODO: add unit test for the method 'GetInventory'
var response = instance.GetInventory();
var response = instance.GetInventory();
Assert.IsInstanceOf<Dictionary<string, int?>> (response, "response is Dictionary<string, int?>");
}
@@ -121,7 +121,7 @@ namespace IO.Swagger.Test
{
// TODO: add unit test for the method 'LoginUser'
string username = null; // TODO: replace null with proper value
string password = null; // TODO: replace null with proper value
string password = null; // TODO: replace null with proper value
var response = instance.LoginUser(username, password);
Assert.IsInstanceOf<string> (response, "response is string");
}
@@ -133,7 +133,7 @@ string password = null; // TODO: replace null with proper value
public void LogoutUserTest()
{
// TODO: add unit test for the method 'LogoutUser'
instance.LogoutUser();
instance.LogoutUser();
}
@@ -145,7 +145,7 @@ string password = null; // TODO: replace null with proper value
{
// TODO: add unit test for the method 'UpdateUser'
string username = null; // TODO: replace null with proper value
User body = null; // TODO: replace null with proper value
User body = null; // TODO: replace null with proper value
instance.UpdateUser(username, body);
}
@@ -1,12 +1,11 @@
- the C# library for the Swagger Petstore
# IO.Swagger - 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 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:
This C# 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
- Package version: 1.0.0
- Build date: 2016-04-17T23:54:21.676+08:00
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
## Frameworks supported
@@ -15,7 +14,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
## 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
- [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:
```
@@ -27,34 +26,44 @@ NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploa
## Installation
Run the following command to generate the DLL
- [Mac/Linux] compile-mono.sh
- [Windows] compile.bat
- [Mac/Linux] `/bin/sh compile-mono.sh`
- [Windows] `compile.bat`
Then include the DLL (under the `bin` folder) in the C# project
Then include the DLL (under the `bin` folder) in the C# project, and import the packages:
```csharp
using IO.Swagger.Api;
using IO.Swagger.Client;
```
## Getting Started
```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(){
public void main()
{
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
// 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
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) {
try
{
// Add a new pet to the store
apiInstance.AddPet(body);
}
catch (Exception e)
{
Debug.Print("Exception when calling PetApi.AddPet: " + e.Message );
}
}
@@ -68,62 +77,61 @@ 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
*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)
- [IO.Swagger.Model.Animal](docs/Animal.md)
- [IO.Swagger.Model.ApiResponse](docs/ApiResponse.md)
- [IO.Swagger.Model.Cat](docs/Cat.md)
- [IO.Swagger.Model.Category](docs/Category.md)
- [IO.Swagger.Model.Dog](docs/Dog.md)
- [IO.Swagger.Model.FormatTest](docs/FormatTest.md)
- [IO.Swagger.Model.Model200Response](docs/Model200Response.md)
- [IO.Swagger.Model.ModelReturn](docs/ModelReturn.md)
- [IO.Swagger.Model.Name](docs/Name.md)
- [IO.Swagger.Model.Order](docs/Order.md)
- [IO.Swagger.Model.Pet](docs/Pet.md)
- [IO.Swagger.Model.SpecialModelName](docs/SpecialModelName.md)
- [IO.Swagger.Model.Tag](docs/Tag.md)
- [IO.Swagger.Model.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
### 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
@@ -1,4 +1,4 @@
# Animal
# IO.Swagger.Model.Animal
## Properties
@@ -6,4 +6,3 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ClassName** | **string** | |
@@ -1,4 +1,4 @@
# ApiResponse
# IO.Swagger.Model.ApiResponse
## Properties
@@ -8,4 +8,3 @@ Name | Type | Description | Notes
**Type** | **string** | | [optional]
**Message** | **string** | | [optional]
@@ -1,4 +1,4 @@
# Cat
# IO.Swagger.Model.Cat
## Properties
@@ -7,4 +7,3 @@ Name | Type | Description | Notes
**ClassName** | **string** | |
**Declawed** | **bool?** | | [optional]
@@ -1,4 +1,4 @@
# Category
# IO.Swagger.Model.Category
## Properties
@@ -7,4 +7,3 @@ Name | Type | Description | Notes
**Id** | **long?** | | [optional]
**Name** | **string** | | [optional]
@@ -1,4 +1,4 @@
# Dog
# IO.Swagger.Model.Dog
## Properties
@@ -7,4 +7,3 @@ Name | Type | Description | Notes
**ClassName** | **string** | |
**Breed** | **string** | | [optional]
@@ -1,4 +1,4 @@
# FormatTest
# IO.Swagger.Model.FormatTest
## Properties
@@ -17,4 +17,3 @@ Name | Type | Description | Notes
**DateTime** | **DateTime?** | | [optional]
**Password** | **string** | | [optional]
@@ -1,4 +1,4 @@
# Model200Response
# IO.Swagger.Model.Model200Response
## Properties
@@ -6,4 +6,3 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **int?** | | [optional]
@@ -1,4 +1,4 @@
# ModelReturn
# IO.Swagger.Model.ModelReturn
## Properties
@@ -6,4 +6,3 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_Return** | **int?** | | [optional]
@@ -1,4 +1,4 @@
# Name
# IO.Swagger.Model.Name
## Properties
@@ -7,4 +7,3 @@ Name | Type | Description | Notes
**_Name** | **int?** | |
**SnakeCase** | **int?** | | [optional]
@@ -1,4 +1,4 @@
# Order
# IO.Swagger.Model.Order
## Properties
@@ -11,4 +11,3 @@ Name | Type | Description | Notes
**Status** | **string** | Order Status | [optional]
**Complete** | **bool?** | | [optional] [default to false]
@@ -1,4 +1,4 @@
# Pet
# IO.Swagger.Model.Pet
## Properties
@@ -11,4 +11,3 @@ Name | Type | Description | Notes
**Tags** | [**List&lt;Tag&gt;**](Tag.md) | | [optional]
**Status** | **string** | pet status in the store | [optional]
@@ -4,18 +4,18 @@ 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**](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)
> void AddPet (Pet body)
Add a new pet to the store
@@ -27,13 +27,14 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class AddPetExample
{
public void main(){
public void main()
{
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
@@ -41,9 +42,13 @@ namespace Example
var apiInstance = new PetApi();
var body = new Pet(); // Pet | Pet object that needs to be added to the store
try {
try
{
// Add a new pet to the store
apiInstance.AddPet(body);
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling PetApi.AddPet: " + e.Message );
}
}
@@ -71,7 +76,7 @@ void (empty response body)
- **Accept**: application/xml, application/json
# **DeletePet**
> DeletePet(petId, apiKey)
> void DeletePet (long? petId, string apiKey = null)
Deletes a pet
@@ -83,24 +88,29 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class DeletePetExample
{
public void main(){
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 |
var apiKey = apiKey_example; // string | (optional)
try {
try
{
// Deletes a pet
apiInstance.DeletePet(petId, apiKey);
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling PetApi.DeletePet: " + e.Message );
}
}
@@ -129,7 +139,7 @@ void (empty response body)
- **Accept**: application/xml, application/json
# **FindPetsByStatus**
> List<Pet> FindPetsByStatus(status)
> List<Pet> FindPetsByStatus (List<string> status)
Finds Pets by status
@@ -141,13 +151,14 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class FindPetsByStatusExample
{
public void main(){
public void main()
{
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
@@ -155,10 +166,14 @@ namespace Example
var apiInstance = new PetApi();
var status = new List<string>(); // List<string> | Status values that need to be considered for filter
try {
try
{
// Finds Pets by status
List&lt;Pet&gt; result = apiInstance.FindPetsByStatus(status);
Debug.WriteLine(result);
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling PetApi.FindPetsByStatus: " + e.Message );
}
}
@@ -170,7 +185,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**status** | [**List&lt;string&gt;**](string.md)| Status values that need to be considered for filter |
**status** | [**List<string>**](string.md)| Status values that need to be considered for filter |
### Return type
@@ -186,7 +201,7 @@ Name | Type | Description | Notes
- **Accept**: application/xml, application/json
# **FindPetsByTags**
> List<Pet> FindPetsByTags(tags)
> List<Pet> FindPetsByTags (List<string> tags)
Finds Pets by tags
@@ -198,13 +213,14 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class FindPetsByTagsExample
{
public void main(){
public void main()
{
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
@@ -212,10 +228,14 @@ namespace Example
var apiInstance = new PetApi();
var tags = new List<string>(); // List<string> | Tags to filter by
try {
try
{
// Finds Pets by tags
List&lt;Pet&gt; result = apiInstance.FindPetsByTags(tags);
Debug.WriteLine(result);
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling PetApi.FindPetsByTags: " + e.Message );
}
}
@@ -227,7 +247,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tags** | [**List&lt;string&gt;**](string.md)| Tags to filter by |
**tags** | [**List<string>**](string.md)| Tags to filter by |
### Return type
@@ -243,7 +263,7 @@ Name | Type | Description | Notes
- **Accept**: application/xml, application/json
# **GetPetById**
> Pet GetPetById(petId)
> Pet GetPetById (long? petId)
Find pet by ID
@@ -255,13 +275,14 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class GetPetByIdExample
{
public void main(){
public void main()
{
// Configure API key authorization: api_key
Configuration.Default.ApiKey.Add('api_key', 'YOUR_API_KEY');
@@ -271,10 +292,14 @@ namespace Example
var apiInstance = new PetApi();
var petId = 789; // long? | ID of pet to return
try {
try
{
// Find pet by ID
Pet result = apiInstance.GetPetById(petId);
Debug.WriteLine(result);
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling PetApi.GetPetById: " + e.Message );
}
}
@@ -302,7 +327,7 @@ Name | Type | Description | Notes
- **Accept**: application/xml, application/json
# **UpdatePet**
> UpdatePet(body)
> void UpdatePet (Pet body)
Update an existing pet
@@ -314,13 +339,14 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class UpdatePetExample
{
public void main(){
public void main()
{
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
@@ -328,9 +354,13 @@ namespace Example
var apiInstance = new PetApi();
var body = new Pet(); // Pet | Pet object that needs to be added to the store
try {
try
{
// Update an existing pet
apiInstance.UpdatePet(body);
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling PetApi.UpdatePet: " + e.Message );
}
}
@@ -358,7 +388,7 @@ void (empty response body)
- **Accept**: application/xml, application/json
# **UpdatePetWithForm**
> UpdatePetWithForm(petId, name, status)
> void UpdatePetWithForm (long? petId, string name = null, string status = null)
Updates a pet in the store with form data
@@ -370,25 +400,30 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class UpdatePetWithFormExample
{
public void main(){
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
var name = name_example; // string | Updated name of the pet (optional)
var status = status_example; // string | Updated status of the pet (optional)
try {
try
{
// Updates a pet in the store with form data
apiInstance.UpdatePetWithForm(petId, name, status);
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling PetApi.UpdatePetWithForm: " + e.Message );
}
}
@@ -418,7 +453,7 @@ void (empty response body)
- **Accept**: application/xml, application/json
# **UploadFile**
> ApiResponse UploadFile(petId, additionalMetadata, file)
> ApiResponse UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
uploads an image
@@ -430,26 +465,31 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class UploadFileExample
{
public void main(){
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
var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional)
var file = new System.IO.Stream(); // System.IO.Stream | file to upload (optional)
try {
try
{
// uploads an image
ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file);
Debug.WriteLine(result);
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message );
}
}
@@ -463,7 +503,7 @@ 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]
**file** | **System.IO.Stream**| file to upload | [optional]
### Return type
@@ -1,4 +1,4 @@
# SpecialModelName
# IO.Swagger.Model.SpecialModelName
## Properties
@@ -6,4 +6,3 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**SpecialPropertyName** | **long?** | | [optional]
@@ -4,14 +4,14 @@ 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**](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)
> void DeleteOrder (string orderId)
Delete purchase order by ID
@@ -23,20 +23,25 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class DeleteOrderExample
{
public void main(){
public void main()
{
var apiInstance = new StoreApi();
var orderId = orderId_example; // string | ID of the order that needs to be deleted
try {
try
{
// Delete purchase order by ID
apiInstance.DeleteOrder(orderId);
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling StoreApi.DeleteOrder: " + e.Message );
}
}
@@ -64,7 +69,7 @@ No authorization required
- **Accept**: application/xml, application/json
# **GetInventory**
> Dictionary<string, int?> GetInventory()
> Dictionary<string, int?> GetInventory ()
Returns pet inventories by status
@@ -76,13 +81,14 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class GetInventoryExample
{
public void main(){
public void main()
{
// Configure API key authorization: api_key
Configuration.Default.ApiKey.Add('api_key', 'YOUR_API_KEY');
@@ -91,10 +97,14 @@ namespace Example
var apiInstance = new StoreApi();
try {
try
{
// Returns pet inventories by status
Dictionary&lt;string, int?&gt; result = apiInstance.GetInventory();
Debug.WriteLine(result);
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling StoreApi.GetInventory: " + e.Message );
}
}
@@ -119,7 +129,7 @@ This endpoint does not need any parameter.
- **Accept**: application/json
# **GetOrderById**
> Order GetOrderById(orderId)
> Order GetOrderById (long? orderId)
Find purchase order by ID
@@ -131,21 +141,26 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class GetOrderByIdExample
{
public void main(){
public void main()
{
var apiInstance = new StoreApi();
var orderId = 789; // long? | ID of pet that needs to be fetched
try {
try
{
// Find purchase order by ID
Order result = apiInstance.GetOrderById(orderId);
Debug.WriteLine(result);
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling StoreApi.GetOrderById: " + e.Message );
}
}
@@ -173,7 +188,7 @@ No authorization required
- **Accept**: application/xml, application/json
# **PlaceOrder**
> Order PlaceOrder(body)
> Order PlaceOrder (Order body)
Place an order for a pet
@@ -185,21 +200,26 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class PlaceOrderExample
{
public void main(){
public void main()
{
var apiInstance = new StoreApi();
var body = new Order(); // Order | order placed for purchasing the pet
try {
try
{
// Place an order for a pet
Order result = apiInstance.PlaceOrder(body);
Debug.WriteLine(result);
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling StoreApi.PlaceOrder: " + e.Message );
}
}
@@ -1,4 +1,4 @@
# Tag
# IO.Swagger.Model.Tag
## Properties
@@ -7,4 +7,3 @@ Name | Type | Description | Notes
**Id** | **long?** | | [optional]
**Name** | **string** | | [optional]
@@ -1,4 +1,4 @@
# User
# IO.Swagger.Model.User
## Properties
@@ -13,4 +13,3 @@ Name | Type | Description | Notes
**Phone** | **string** | | [optional]
**UserStatus** | **int?** | User Status | [optional]
@@ -4,18 +4,18 @@ 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**](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)
> void CreateUser (User body)
Create user
@@ -27,20 +27,25 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class CreateUserExample
{
public void main(){
public void main()
{
var apiInstance = new UserApi();
var body = new User(); // User | Created user object
try {
try
{
// Create user
apiInstance.CreateUser(body);
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.CreateUser: " + e.Message );
}
}
@@ -68,7 +73,7 @@ No authorization required
- **Accept**: application/xml, application/json
# **CreateUsersWithArrayInput**
> CreateUsersWithArrayInput(body)
> void CreateUsersWithArrayInput (List<User> body)
Creates list of users with given input array
@@ -80,20 +85,25 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class CreateUsersWithArrayInputExample
{
public void main(){
public void main()
{
var apiInstance = new UserApi();
var body = new List<User>(); // List<User> | List of user object
try {
try
{
// Creates list of users with given input array
apiInstance.CreateUsersWithArrayInput(body);
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.CreateUsersWithArrayInput: " + e.Message );
}
}
@@ -105,7 +115,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object |
**body** | [**List<User>**](User.md)| List of user object |
### Return type
@@ -121,7 +131,7 @@ No authorization required
- **Accept**: application/xml, application/json
# **CreateUsersWithListInput**
> CreateUsersWithListInput(body)
> void CreateUsersWithListInput (List<User> body)
Creates list of users with given input array
@@ -133,20 +143,25 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class CreateUsersWithListInputExample
{
public void main(){
public void main()
{
var apiInstance = new UserApi();
var body = new List<User>(); // List<User> | List of user object
try {
try
{
// Creates list of users with given input array
apiInstance.CreateUsersWithListInput(body);
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.CreateUsersWithListInput: " + e.Message );
}
}
@@ -158,7 +173,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object |
**body** | [**List<User>**](User.md)| List of user object |
### Return type
@@ -174,7 +189,7 @@ No authorization required
- **Accept**: application/xml, application/json
# **DeleteUser**
> DeleteUser(username)
> void DeleteUser (string username)
Delete user
@@ -186,20 +201,25 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class DeleteUserExample
{
public void main(){
public void main()
{
var apiInstance = new UserApi();
var username = username_example; // string | The name that needs to be deleted
try {
try
{
// Delete user
apiInstance.DeleteUser(username);
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.DeleteUser: " + e.Message );
}
}
@@ -227,7 +247,7 @@ No authorization required
- **Accept**: application/xml, application/json
# **GetUserByName**
> User GetUserByName(username)
> User GetUserByName (string username)
Get user by user name
@@ -239,21 +259,26 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class GetUserByNameExample
{
public void main(){
public void main()
{
var apiInstance = new UserApi();
var username = username_example; // string | The name that needs to be fetched. Use user1 for testing.
try {
try
{
// Get user by user name
User result = apiInstance.GetUserByName(username);
Debug.WriteLine(result);
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.GetUserByName: " + e.Message );
}
}
@@ -281,7 +306,7 @@ No authorization required
- **Accept**: application/xml, application/json
# **LoginUser**
> string LoginUser(username, password)
> string LoginUser (string username, string password)
Logs user into the system
@@ -293,22 +318,27 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class LoginUserExample
{
public void main(){
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 {
try
{
// Logs user into the system
string result = apiInstance.LoginUser(username, password);
Debug.WriteLine(result);
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.LoginUser: " + e.Message );
}
}
@@ -337,7 +367,7 @@ No authorization required
- **Accept**: application/xml, application/json
# **LogoutUser**
> LogoutUser()
> void LogoutUser ()
Logs out current logged in user session
@@ -349,19 +379,24 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class LogoutUserExample
{
public void main(){
public void main()
{
var apiInstance = new UserApi();
try {
try
{
// Logs out current logged in user session
apiInstance.LogoutUser();
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.LogoutUser: " + e.Message );
}
}
@@ -386,7 +421,7 @@ No authorization required
- **Accept**: application/xml, application/json
# **UpdateUser**
> UpdateUser(username, body)
> void UpdateUser (string username, User body)
Updated user
@@ -398,21 +433,26 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
using IO.Swagger.Model;
namespace Example
{
public class UpdateUserExample
{
public void main(){
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 {
try
{
// Updated user
apiInstance.UpdateUser(username, body);
} catch (Exception e) {
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.UpdateUser: " + e.Message );
}
}
@@ -1,5 +1,4 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
@@ -179,7 +178,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, Stream file = null);
ApiResponse UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
/// <summary>
/// uploads an image
@@ -192,7 +191,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, Stream file = null);
ApiResponse<ApiResponse> UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
@@ -359,7 +358,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, Stream file = null);
System.Threading.Tasks.Task<ApiResponse> UploadFileAsync (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
/// <summary>
/// uploads an image
@@ -372,7 +371,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, Stream file = null);
System.Threading.Tasks.Task<ApiResponse<ApiResponse>> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
#endregion Asynchronous Operations
}
@@ -1589,7 +1588,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, Stream file = null)
public ApiResponse UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
{
ApiResponse<ApiResponse> localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file);
return localVarResponse.Data;
@@ -1603,7 +1602,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, Stream file = null)
public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
{
// verify the required parameter 'petId' is set
if (petId == null)
@@ -1671,7 +1670,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, Stream file = null)
public async System.Threading.Tasks.Task<ApiResponse> UploadFileAsync (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
{
ApiResponse<ApiResponse> localVarResponse = await UploadFileAsyncWithHttpInfo(petId, additionalMetadata, file);
return localVarResponse.Data;
@@ -1686,7 +1685,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, Stream file = null)
public async System.Threading.Tasks.Task<ApiResponse<ApiResponse>> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
{
// verify the required parameter 'petId' is set
if (petId == null)
@@ -1,5 +1,4 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
@@ -1,5 +1,4 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;