forked from loafle/openapi-generator-original
merge from upstream
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Model;
|
||||
using IO.Swagger.Client;
|
||||
using System.Reflection;
|
||||
|
||||
namespace IO.Swagger.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing ApiResponse
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class ApiResponseTests
|
||||
{
|
||||
private ApiResponse instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
instance = new ApiResponse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of ApiResponse
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ApiResponseInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<ApiResponse> (instance, "instance is a ApiResponse");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Code'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void CodeTest()
|
||||
{
|
||||
// TODO: unit test for the property 'Code'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Type'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TypeTest()
|
||||
{
|
||||
// TODO: unit test for the property 'Type'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Message'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void MessageTest()
|
||||
{
|
||||
// TODO: unit test for the property 'Message'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -65,18 +65,6 @@ namespace IO.Swagger.Test
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test AddPetUsingByteArray
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void AddPetUsingByteArrayTest()
|
||||
{
|
||||
// TODO: add unit test for the method 'AddPetUsingByteArray'
|
||||
byte[] body = null; // TODO: replace null with proper value
|
||||
instance.AddPetUsingByteArray(body);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test DeletePet
|
||||
/// </summary>
|
||||
@@ -126,30 +114,6 @@ string apiKey = null; // TODO: replace null with proper value
|
||||
Assert.IsInstanceOf<Pet> (response, "response is Pet");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test GetPetByIdInObject
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void GetPetByIdInObjectTest()
|
||||
{
|
||||
// TODO: add unit test for the method 'GetPetByIdInObject'
|
||||
long? petId = null; // TODO: replace null with proper value
|
||||
var response = instance.GetPetByIdInObject(petId);
|
||||
Assert.IsInstanceOf<InlineResponse200> (response, "response is InlineResponse200");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test PetPetIdtestingByteArraytrueGet
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void PetPetIdtestingByteArraytrueGetTest()
|
||||
{
|
||||
// TODO: add unit test for the method 'PetPetIdtestingByteArraytrueGet'
|
||||
long? petId = null; // TODO: replace null with proper value
|
||||
var response = instance.PetPetIdtestingByteArraytrueGet(petId);
|
||||
Assert.IsInstanceOf<byte[]> (response, "response is byte[]");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test UpdatePet
|
||||
/// </summary>
|
||||
@@ -169,7 +133,7 @@ string apiKey = null; // TODO: replace null with proper value
|
||||
public void UpdatePetWithFormTest()
|
||||
{
|
||||
// TODO: add unit test for the method 'UpdatePetWithForm'
|
||||
string petId = null; // TODO: replace null with proper value
|
||||
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
|
||||
instance.UpdatePetWithForm(petId, name, status);
|
||||
@@ -186,8 +150,8 @@ string status = null; // TODO: replace null with proper value
|
||||
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
|
||||
instance.UploadFile(petId, additionalMetadata, file);
|
||||
|
||||
var response = instance.UploadFile(petId, additionalMetadata, file);
|
||||
Assert.IsInstanceOf<ApiResponse> (response, "response is ApiResponse");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -65,18 +65,6 @@ namespace IO.Swagger.Test
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test FindOrdersByStatus
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void FindOrdersByStatusTest()
|
||||
{
|
||||
// TODO: add unit test for the method 'FindOrdersByStatus'
|
||||
string status = null; // TODO: replace null with proper value
|
||||
var response = instance.FindOrdersByStatus(status);
|
||||
Assert.IsInstanceOf<List<Order>> (response, "response is List<Order>");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test GetInventory
|
||||
/// </summary>
|
||||
@@ -88,17 +76,6 @@ namespace IO.Swagger.Test
|
||||
Assert.IsInstanceOf<Dictionary<string, int?>> (response, "response is Dictionary<string, int?>");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test GetInventoryInObject
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void GetInventoryInObjectTest()
|
||||
{
|
||||
// TODO: add unit test for the method 'GetInventoryInObject'
|
||||
var response = instance.GetInventoryInObject();
|
||||
Assert.IsInstanceOf<Object> (response, "response is Object");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test GetOrderById
|
||||
/// </summary>
|
||||
@@ -106,7 +83,7 @@ namespace IO.Swagger.Test
|
||||
public void GetOrderByIdTest()
|
||||
{
|
||||
// TODO: add unit test for the method 'GetOrderById'
|
||||
string orderId = null; // TODO: replace null with proper value
|
||||
long? orderId = null; // TODO: replace null with proper value
|
||||
var response = instance.GetOrderById(orderId);
|
||||
Assert.IsInstanceOf<Order> (response, "response is Order");
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
- 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 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:16:33.913-04:00
|
||||
- Build date: 2016-04-14T08:34:43.608-04:00
|
||||
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
|
||||
|
||||
## Frameworks supported
|
||||
@@ -69,20 +69,15 @@ 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
|
||||
@@ -98,11 +93,11 @@ Class | Method | HTTP request | Description
|
||||
## 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)
|
||||
- [::InlineResponse200](docs/InlineResponse200.md)
|
||||
- [::Model200Response](docs/Model200Response.md)
|
||||
- [::ModelReturn](docs/ModelReturn.md)
|
||||
- [::Name](docs/Name.md)
|
||||
@@ -120,43 +115,15 @@ Class | Method | HTTP request | Description
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Authorizatoin 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,11 @@
|
||||
# ApiResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Code** | **int?** | | [optional]
|
||||
**Type** | **string** | | [optional]
|
||||
**Message** | **string** | | [optional]
|
||||
|
||||
|
||||
@@ -9,6 +9,6 @@ Name | Type | Description | Notes
|
||||
**Quantity** | **int?** | | [optional]
|
||||
**ShipDate** | **DateTime?** | | [optional]
|
||||
**Status** | **string** | Order Status | [optional]
|
||||
**Complete** | **bool?** | | [optional]
|
||||
**Complete** | **bool?** | | [optional] [default to false]
|
||||
|
||||
|
||||
|
||||
@@ -5,13 +5,10 @@ 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
|
||||
@@ -58,7 +55,7 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -71,63 +68,7 @@ void (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
# **AddPetUsingByteArray**
|
||||
> AddPetUsingByteArray(body)
|
||||
|
||||
Fake endpoint to test byte array in body parameter for adding 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 AddPetUsingByteArrayExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var body = BINARY_DATA_HERE; // byte[] | Pet object in the form of byte array
|
||||
|
||||
try {
|
||||
apiInstance.AddPetUsingByteArray(body);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.AddPetUsingByteArray: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **byte[]**| 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
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **DeletePet**
|
||||
> DeletePet(petId, apiKey)
|
||||
@@ -185,7 +126,7 @@ void (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **FindPetsByStatus**
|
||||
> List<Pet> FindPetsByStatus(status)
|
||||
@@ -212,7 +153,7 @@ namespace Example
|
||||
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 query
|
||||
var status = new List<string>(); // List<string> | Status values that need to be considered for filter
|
||||
|
||||
try {
|
||||
List<Pet> result = apiInstance.FindPetsByStatus(status);
|
||||
@@ -229,7 +170,7 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**List<string>**](string.md)| Status values that need to be considered for query | [optional] [default to available]
|
||||
**status** | [**List<string>**](string.md)| Status values that need to be considered for filter |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -242,14 +183,14 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **FindPetsByTags**
|
||||
> List<Pet> FindPetsByTags(tags)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
@@ -286,7 +227,7 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**List<string>**](string.md)| Tags to filter by | [optional]
|
||||
**tags** | [**List<string>**](string.md)| Tags to filter by |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -299,14 +240,14 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **GetPetById**
|
||||
> Pet GetPetById(petId)
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
Returns a single pet
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
@@ -322,15 +263,13 @@ namespace Example
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
// 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 that needs to be fetched
|
||||
var petId = 789; // long? | ID of pet to return
|
||||
|
||||
try {
|
||||
Pet result = apiInstance.GetPetById(petId);
|
||||
@@ -347,7 +286,7 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **long?**| ID of pet that needs to be fetched |
|
||||
**petId** | **long?**| ID of pet to return |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -355,134 +294,12 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
# **GetPetByIdInObject**
|
||||
> InlineResponse200 GetPetByIdInObject(petId)
|
||||
|
||||
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
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class GetPetByIdInObjectExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
// 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 that needs to be fetched
|
||||
|
||||
try {
|
||||
InlineResponse200 result = apiInstance.GetPetByIdInObject(petId);
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.GetPetByIdInObject: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **long?**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponse200**](InlineResponse200.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
# **PetPetIdtestingByteArraytrueGet**
|
||||
> byte[] PetPetIdtestingByteArraytrueGet(petId)
|
||||
|
||||
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
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class PetPetIdtestingByteArraytrueGetExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
// 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 that needs to be fetched
|
||||
|
||||
try {
|
||||
byte[] result = apiInstance.PetPetIdtestingByteArraytrueGet(petId);
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.PetPetIdtestingByteArraytrueGet: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **long?**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
**byte[]**
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **UpdatePet**
|
||||
> UpdatePet(body)
|
||||
@@ -525,7 +342,7 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -538,7 +355,7 @@ void (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **UpdatePetWithForm**
|
||||
> UpdatePetWithForm(petId, name, status)
|
||||
@@ -565,7 +382,7 @@ namespace Example
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var petId = petId_example; // string | ID of pet that needs to be updated
|
||||
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
|
||||
|
||||
@@ -583,7 +400,7 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **string**| ID of pet that needs to be updated |
|
||||
**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]
|
||||
|
||||
@@ -598,10 +415,10 @@ void (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **UploadFile**
|
||||
> UploadFile(petId, additionalMetadata, file)
|
||||
> ApiResponse UploadFile(petId, additionalMetadata, file)
|
||||
|
||||
uploads an image
|
||||
|
||||
@@ -630,7 +447,8 @@ namespace Example
|
||||
var file = new Stream(); // Stream | file to upload
|
||||
|
||||
try {
|
||||
apiInstance.UploadFile(petId, additionalMetadata, file);
|
||||
ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file);
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message );
|
||||
}
|
||||
@@ -649,7 +467,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@@ -658,5 +476,5 @@ void (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
@@ -5,9 +5,7 @@ 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
|
||||
|
||||
@@ -63,70 +61,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
# **FindOrdersByStatus**
|
||||
> List<Order> FindOrdersByStatus(status)
|
||||
|
||||
Finds orders by status
|
||||
|
||||
A single status value can be provided as a string
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class FindOrdersByStatusExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// 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');
|
||||
|
||||
var apiInstance = new StoreApi();
|
||||
var status = status_example; // string | Status value that needs to be considered for query
|
||||
|
||||
try {
|
||||
List<Order> result = apiInstance.FindOrdersByStatus(status);
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling StoreApi.FindOrdersByStatus: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | **string**| 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
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **GetInventory**
|
||||
> Dictionary<string, int?> GetInventory()
|
||||
@@ -181,62 +116,7 @@ This endpoint does not need any parameter.
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
# **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
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class GetInventoryInObjectExample
|
||||
{
|
||||
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 {
|
||||
Object result = apiInstance.GetInventoryInObject();
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling StoreApi.GetInventoryInObject: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 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
|
||||
- **Accept**: application/json
|
||||
|
||||
# **GetOrderById**
|
||||
> Order GetOrderById(orderId)
|
||||
@@ -259,17 +139,8 @@ namespace Example
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// 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 StoreApi();
|
||||
var orderId = orderId_example; // string | ID of pet that needs to be fetched
|
||||
var orderId = 789; // long? | ID of pet that needs to be fetched
|
||||
|
||||
try {
|
||||
Order result = apiInstance.GetOrderById(orderId);
|
||||
@@ -286,7 +157,7 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **string**| ID of pet that needs to be fetched |
|
||||
**orderId** | **long?**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -294,12 +165,12 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
[test_api_key_query](../README.md#test_api_key_query), [test_api_key_header](../README.md#test_api_key_header)
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **PlaceOrder**
|
||||
> Order PlaceOrder(body)
|
||||
@@ -322,15 +193,6 @@ namespace Example
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// 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');
|
||||
|
||||
var apiInstance = new StoreApi();
|
||||
var body = new Order(); // Order | order placed for purchasing the pet
|
||||
|
||||
@@ -349,7 +211,7 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet | [optional]
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -357,10 +219,10 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**User**](User.md)| Created user object | [optional]
|
||||
**body** | [**User**](User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -65,7 +65,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **CreateUsersWithArrayInput**
|
||||
> CreateUsersWithArrayInput(body)
|
||||
@@ -105,7 +105,7 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**List<User>**](User.md)| List of user object | [optional]
|
||||
**body** | [**List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -118,7 +118,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **CreateUsersWithListInput**
|
||||
> CreateUsersWithListInput(body)
|
||||
@@ -158,7 +158,7 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**List<User>**](User.md)| List of user object | [optional]
|
||||
**body** | [**List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -171,7 +171,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **DeleteUser**
|
||||
> DeleteUser(username)
|
||||
@@ -194,10 +194,6 @@ namespace Example
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure HTTP basic authorization: test_http_basic
|
||||
Configuration.Default.Username = 'YOUR_USERNAME';
|
||||
Configuration.Default.Password = 'YOUR_PASSWORD';
|
||||
|
||||
var apiInstance = new UserApi();
|
||||
var username = username_example; // string | The name that needs to be deleted
|
||||
|
||||
@@ -223,12 +219,12 @@ void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[test_http_basic](../README.md#test_http_basic)
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **GetUserByName**
|
||||
> User GetUserByName(username)
|
||||
@@ -282,7 +278,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **LoginUser**
|
||||
> string LoginUser(username, password)
|
||||
@@ -324,8 +320,8 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **string**| The user name for login | [optional]
|
||||
**password** | **string**| The password for login in clear text | [optional]
|
||||
**username** | **string**| The user name for login |
|
||||
**password** | **string**| The password for login in clear text |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -338,7 +334,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **LogoutUser**
|
||||
> LogoutUser()
|
||||
@@ -387,7 +383,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
# **UpdateUser**
|
||||
> UpdateUser(username, body)
|
||||
@@ -429,7 +425,7 @@ namespace Example
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **string**| name that need to be deleted |
|
||||
**body** | [**User**](User.md)| Updated user object | [optional]
|
||||
**body** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -442,5 +438,5 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -37,27 +37,6 @@ namespace IO.Swagger.Api
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> DeleteOrderWithHttpInfo (string orderId);
|
||||
/// <summary>
|
||||
/// Finds orders by status
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A single status value can be provided as a string
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
|
||||
/// <returns>List<Order></returns>
|
||||
List<Order> FindOrdersByStatus (string status = null);
|
||||
|
||||
/// <summary>
|
||||
/// Finds orders by status
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A single status value can be provided as a string
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
|
||||
/// <returns>ApiResponse of List<Order></returns>
|
||||
ApiResponse<List<Order>> FindOrdersByStatusWithHttpInfo (string status = null);
|
||||
/// <summary>
|
||||
/// Returns pet inventories by status
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@@ -77,25 +56,6 @@ namespace IO.Swagger.Api
|
||||
/// <returns>ApiResponse of Dictionary<string, int?></returns>
|
||||
ApiResponse<Dictionary<string, int?>> GetInventoryWithHttpInfo ();
|
||||
/// <summary>
|
||||
/// Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns an arbitrary object which is actually a map of status codes to quantities
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>Object</returns>
|
||||
Object GetInventoryInObject ();
|
||||
|
||||
/// <summary>
|
||||
/// Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns an arbitrary object which is actually a map of status codes to quantities
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>ApiResponse of Object</returns>
|
||||
ApiResponse<Object> GetInventoryInObjectWithHttpInfo ();
|
||||
/// <summary>
|
||||
/// Find purchase order by ID
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@@ -104,7 +64,7 @@ namespace IO.Swagger.Api
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||
/// <returns>Order</returns>
|
||||
Order GetOrderById (string orderId);
|
||||
Order GetOrderById (long? orderId);
|
||||
|
||||
/// <summary>
|
||||
/// Find purchase order by ID
|
||||
@@ -115,7 +75,7 @@ namespace IO.Swagger.Api
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||
/// <returns>ApiResponse of Order</returns>
|
||||
ApiResponse<Order> GetOrderByIdWithHttpInfo (string orderId);
|
||||
ApiResponse<Order> GetOrderByIdWithHttpInfo (long? orderId);
|
||||
/// <summary>
|
||||
/// Place an order for a pet
|
||||
/// </summary>
|
||||
@@ -123,9 +83,9 @@ namespace IO.Swagger.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">order placed for purchasing the pet (optional)</param>
|
||||
/// <param name="body">order placed for purchasing the pet</param>
|
||||
/// <returns>Order</returns>
|
||||
Order PlaceOrder (Order body = null);
|
||||
Order PlaceOrder (Order body);
|
||||
|
||||
/// <summary>
|
||||
/// Place an order for a pet
|
||||
@@ -134,9 +94,9 @@ namespace IO.Swagger.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">order placed for purchasing the pet (optional)</param>
|
||||
/// <param name="body">order placed for purchasing the pet</param>
|
||||
/// <returns>ApiResponse of Order</returns>
|
||||
ApiResponse<Order> PlaceOrderWithHttpInfo (Order body = null);
|
||||
ApiResponse<Order> PlaceOrderWithHttpInfo (Order body);
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
@@ -161,27 +121,6 @@ namespace IO.Swagger.Api
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> DeleteOrderAsyncWithHttpInfo (string orderId);
|
||||
/// <summary>
|
||||
/// Finds orders by status
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A single status value can be provided as a string
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
|
||||
/// <returns>Task of List<Order></returns>
|
||||
System.Threading.Tasks.Task<List<Order>> FindOrdersByStatusAsync (string status = null);
|
||||
|
||||
/// <summary>
|
||||
/// Finds orders by status
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A single status value can be provided as a string
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
|
||||
/// <returns>Task of ApiResponse (List<Order>)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<List<Order>>> FindOrdersByStatusAsyncWithHttpInfo (string status = null);
|
||||
/// <summary>
|
||||
/// Returns pet inventories by status
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@@ -201,25 +140,6 @@ namespace IO.Swagger.Api
|
||||
/// <returns>Task of ApiResponse (Dictionary<string, int?>)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Dictionary<string, int?>>> GetInventoryAsyncWithHttpInfo ();
|
||||
/// <summary>
|
||||
/// Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns an arbitrary object which is actually a map of status codes to quantities
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>Task of Object</returns>
|
||||
System.Threading.Tasks.Task<Object> GetInventoryInObjectAsync ();
|
||||
|
||||
/// <summary>
|
||||
/// Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns an arbitrary object which is actually a map of status codes to quantities
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>Task of ApiResponse (Object)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> GetInventoryInObjectAsyncWithHttpInfo ();
|
||||
/// <summary>
|
||||
/// Find purchase order by ID
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@@ -228,7 +148,7 @@ namespace IO.Swagger.Api
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||
/// <returns>Task of Order</returns>
|
||||
System.Threading.Tasks.Task<Order> GetOrderByIdAsync (string orderId);
|
||||
System.Threading.Tasks.Task<Order> GetOrderByIdAsync (long? orderId);
|
||||
|
||||
/// <summary>
|
||||
/// Find purchase order by ID
|
||||
@@ -239,7 +159,7 @@ namespace IO.Swagger.Api
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||
/// <returns>Task of ApiResponse (Order)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (string orderId);
|
||||
System.Threading.Tasks.Task<ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (long? orderId);
|
||||
/// <summary>
|
||||
/// Place an order for a pet
|
||||
/// </summary>
|
||||
@@ -247,9 +167,9 @@ namespace IO.Swagger.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">order placed for purchasing the pet (optional)</param>
|
||||
/// <param name="body">order placed for purchasing the pet</param>
|
||||
/// <returns>Task of Order</returns>
|
||||
System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body = null);
|
||||
System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body);
|
||||
|
||||
/// <summary>
|
||||
/// Place an order for a pet
|
||||
@@ -258,9 +178,9 @@ namespace IO.Swagger.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">order placed for purchasing the pet (optional)</param>
|
||||
/// <param name="body">order placed for purchasing the pet</param>
|
||||
/// <returns>Task of ApiResponse (Order)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Order>> PlaceOrderAsyncWithHttpInfo (Order body = null);
|
||||
System.Threading.Tasks.Task<ApiResponse<Order>> PlaceOrderAsyncWithHttpInfo (Order body);
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
@@ -389,8 +309,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -459,8 +379,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -490,163 +410,6 @@ namespace IO.Swagger.Api
|
||||
null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds orders by status A single status value can be provided as a string
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
|
||||
/// <returns>List<Order></returns>
|
||||
public List<Order> FindOrdersByStatus (string status = null)
|
||||
{
|
||||
ApiResponse<List<Order>> localVarResponse = FindOrdersByStatusWithHttpInfo(status);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds orders by status A single status value can be provided as a string
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
|
||||
/// <returns>ApiResponse of List<Order></returns>
|
||||
public ApiResponse< List<Order> > FindOrdersByStatusWithHttpInfo (string status = null)
|
||||
{
|
||||
|
||||
var localVarPath = "/store/findByStatus";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
var localVarQueryParams = new Dictionary<String, String>();
|
||||
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<String, String>();
|
||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
String[] localVarHttpContentTypes = new String[] {
|
||||
};
|
||||
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
// set "format" to json by default
|
||||
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter
|
||||
|
||||
// authentication (test_api_client_id) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_id")))
|
||||
{
|
||||
localVarHeaderParams["x-test_api_client_id"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_id");
|
||||
}
|
||||
|
||||
// authentication (test_api_client_secret) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_secret")))
|
||||
{
|
||||
localVarHeaderParams["x-test_api_client_secret"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_secret");
|
||||
}
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||
|
||||
if (localVarStatusCode >= 400)
|
||||
throw new ApiException (localVarStatusCode, "Error calling FindOrdersByStatus: " + localVarResponse.Content, localVarResponse.Content);
|
||||
else if (localVarStatusCode == 0)
|
||||
throw new ApiException (localVarStatusCode, "Error calling FindOrdersByStatus: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage);
|
||||
|
||||
return new ApiResponse<List<Order>>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(List<Order>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Order>)));
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds orders by status A single status value can be provided as a string
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
|
||||
/// <returns>Task of List<Order></returns>
|
||||
public async System.Threading.Tasks.Task<List<Order>> FindOrdersByStatusAsync (string status = null)
|
||||
{
|
||||
ApiResponse<List<Order>> localVarResponse = await FindOrdersByStatusAsyncWithHttpInfo(status);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds orders by status A single status value can be provided as a string
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
|
||||
/// <returns>Task of ApiResponse (List<Order>)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<List<Order>>> FindOrdersByStatusAsyncWithHttpInfo (string status = null)
|
||||
{
|
||||
|
||||
var localVarPath = "/store/findByStatus";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
var localVarQueryParams = new Dictionary<String, String>();
|
||||
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<String, String>();
|
||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
String[] localVarHttpContentTypes = new String[] {
|
||||
};
|
||||
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
// set "format" to json by default
|
||||
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter
|
||||
|
||||
// authentication (test_api_client_id) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_id")))
|
||||
{
|
||||
localVarHeaderParams["x-test_api_client_id"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_id");
|
||||
}
|
||||
// authentication (test_api_client_secret) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_secret")))
|
||||
{
|
||||
localVarHeaderParams["x-test_api_client_secret"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_secret");
|
||||
}
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||
|
||||
if (localVarStatusCode >= 400)
|
||||
throw new ApiException (localVarStatusCode, "Error calling FindOrdersByStatus: " + localVarResponse.Content, localVarResponse.Content);
|
||||
else if (localVarStatusCode == 0)
|
||||
throw new ApiException (localVarStatusCode, "Error calling FindOrdersByStatus: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage);
|
||||
|
||||
return new ApiResponse<List<Order>>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(List<Order>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Order>)));
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||
/// </summary>
|
||||
@@ -681,8 +444,7 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -752,8 +514,7 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -787,153 +548,13 @@ namespace IO.Swagger.Api
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fake endpoint to test arbitrary object return by 'Get inventory' Returns an arbitrary object which is actually a map of status codes to quantities
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>Object</returns>
|
||||
public Object GetInventoryInObject ()
|
||||
{
|
||||
ApiResponse<Object> localVarResponse = GetInventoryInObjectWithHttpInfo();
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fake endpoint to test arbitrary object return by 'Get inventory' Returns an arbitrary object which is actually a map of status codes to quantities
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>ApiResponse of Object</returns>
|
||||
public ApiResponse< Object > GetInventoryInObjectWithHttpInfo ()
|
||||
{
|
||||
|
||||
var localVarPath = "/store/inventory?response=arbitrary_object";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
var localVarQueryParams = new Dictionary<String, String>();
|
||||
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<String, String>();
|
||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
String[] localVarHttpContentTypes = new String[] {
|
||||
};
|
||||
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
// set "format" to json by default
|
||||
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
|
||||
localVarPathParams.Add("format", "json");
|
||||
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||
|
||||
if (localVarStatusCode >= 400)
|
||||
throw new ApiException (localVarStatusCode, "Error calling GetInventoryInObject: " + localVarResponse.Content, localVarResponse.Content);
|
||||
else if (localVarStatusCode == 0)
|
||||
throw new ApiException (localVarStatusCode, "Error calling GetInventoryInObject: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage);
|
||||
|
||||
return new ApiResponse<Object>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(Object) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object)));
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fake endpoint to test arbitrary object return by 'Get inventory' Returns an arbitrary object which is actually a map of status codes to quantities
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>Task of Object</returns>
|
||||
public async System.Threading.Tasks.Task<Object> GetInventoryInObjectAsync ()
|
||||
{
|
||||
ApiResponse<Object> localVarResponse = await GetInventoryInObjectAsyncWithHttpInfo();
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fake endpoint to test arbitrary object return by 'Get inventory' Returns an arbitrary object which is actually a map of status codes to quantities
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>Task of ApiResponse (Object)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> GetInventoryInObjectAsyncWithHttpInfo ()
|
||||
{
|
||||
|
||||
var localVarPath = "/store/inventory?response=arbitrary_object";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
var localVarQueryParams = new Dictionary<String, String>();
|
||||
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<String, String>();
|
||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
String[] localVarHttpContentTypes = new String[] {
|
||||
};
|
||||
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
// set "format" to json by default
|
||||
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
|
||||
localVarPathParams.Add("format", "json");
|
||||
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||
|
||||
if (localVarStatusCode >= 400)
|
||||
throw new ApiException (localVarStatusCode, "Error calling GetInventoryInObject: " + localVarResponse.Content, localVarResponse.Content);
|
||||
else if (localVarStatusCode == 0)
|
||||
throw new ApiException (localVarStatusCode, "Error calling GetInventoryInObject: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage);
|
||||
|
||||
return new ApiResponse<Object>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(Object) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object)));
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||
/// <returns>Order</returns>
|
||||
public Order GetOrderById (string orderId)
|
||||
public Order GetOrderById (long? orderId)
|
||||
{
|
||||
ApiResponse<Order> localVarResponse = GetOrderByIdWithHttpInfo(orderId);
|
||||
return localVarResponse.Data;
|
||||
@@ -945,7 +566,7 @@ namespace IO.Swagger.Api
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||
/// <returns>ApiResponse of Order</returns>
|
||||
public ApiResponse< Order > GetOrderByIdWithHttpInfo (string orderId)
|
||||
public ApiResponse< Order > GetOrderByIdWithHttpInfo (long? orderId)
|
||||
{
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null)
|
||||
@@ -966,8 +587,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -978,18 +599,6 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter
|
||||
|
||||
// authentication (test_api_key_query) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_query")))
|
||||
{
|
||||
localVarQueryParams["test_api_key_query"] = Configuration.GetApiKeyWithPrefix("test_api_key_query");
|
||||
}
|
||||
|
||||
// authentication (test_api_key_header) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_header")))
|
||||
{
|
||||
localVarHeaderParams["test_api_key_header"] = Configuration.GetApiKeyWithPrefix("test_api_key_header");
|
||||
}
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||
@@ -1015,7 +624,7 @@ namespace IO.Swagger.Api
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||
/// <returns>Task of Order</returns>
|
||||
public async System.Threading.Tasks.Task<Order> GetOrderByIdAsync (string orderId)
|
||||
public async System.Threading.Tasks.Task<Order> GetOrderByIdAsync (long? orderId)
|
||||
{
|
||||
ApiResponse<Order> localVarResponse = await GetOrderByIdAsyncWithHttpInfo(orderId);
|
||||
return localVarResponse.Data;
|
||||
@@ -1028,7 +637,7 @@ namespace IO.Swagger.Api
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||
/// <returns>Task of ApiResponse (Order)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (string orderId)
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (long? orderId)
|
||||
{
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null)
|
||||
@@ -1049,8 +658,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -1061,16 +670,6 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter
|
||||
|
||||
// authentication (test_api_key_query) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_query")))
|
||||
{
|
||||
localVarQueryParams["test_api_key_query"] = Configuration.GetApiKeyWithPrefix("test_api_key_query");
|
||||
}
|
||||
// authentication (test_api_key_header) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_header")))
|
||||
{
|
||||
localVarHeaderParams["test_api_key_header"] = Configuration.GetApiKeyWithPrefix("test_api_key_header");
|
||||
}
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
@@ -1094,9 +693,9 @@ namespace IO.Swagger.Api
|
||||
/// Place an order for a pet
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">order placed for purchasing the pet (optional)</param>
|
||||
/// <param name="body">order placed for purchasing the pet</param>
|
||||
/// <returns>Order</returns>
|
||||
public Order PlaceOrder (Order body = null)
|
||||
public Order PlaceOrder (Order body)
|
||||
{
|
||||
ApiResponse<Order> localVarResponse = PlaceOrderWithHttpInfo(body);
|
||||
return localVarResponse.Data;
|
||||
@@ -1106,10 +705,13 @@ namespace IO.Swagger.Api
|
||||
/// Place an order for a pet
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">order placed for purchasing the pet (optional)</param>
|
||||
/// <param name="body">order placed for purchasing the pet</param>
|
||||
/// <returns>ApiResponse of Order</returns>
|
||||
public ApiResponse< Order > PlaceOrderWithHttpInfo (Order body = null)
|
||||
public ApiResponse< Order > PlaceOrderWithHttpInfo (Order body)
|
||||
{
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null)
|
||||
throw new ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder");
|
||||
|
||||
var localVarPath = "/store/order";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
@@ -1126,8 +728,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -1145,18 +747,6 @@ namespace IO.Swagger.Api
|
||||
localVarPostBody = body; // byte array
|
||||
}
|
||||
|
||||
// authentication (test_api_client_id) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_id")))
|
||||
{
|
||||
localVarHeaderParams["x-test_api_client_id"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_id");
|
||||
}
|
||||
|
||||
// authentication (test_api_client_secret) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_secret")))
|
||||
{
|
||||
localVarHeaderParams["x-test_api_client_secret"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_secret");
|
||||
}
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||
@@ -1180,9 +770,9 @@ namespace IO.Swagger.Api
|
||||
/// Place an order for a pet
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">order placed for purchasing the pet (optional)</param>
|
||||
/// <param name="body">order placed for purchasing the pet</param>
|
||||
/// <returns>Task of Order</returns>
|
||||
public async System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body = null)
|
||||
public async System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body)
|
||||
{
|
||||
ApiResponse<Order> localVarResponse = await PlaceOrderAsyncWithHttpInfo(body);
|
||||
return localVarResponse.Data;
|
||||
@@ -1193,10 +783,13 @@ namespace IO.Swagger.Api
|
||||
/// Place an order for a pet
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">order placed for purchasing the pet (optional)</param>
|
||||
/// <param name="body">order placed for purchasing the pet</param>
|
||||
/// <returns>Task of ApiResponse (Order)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Order>> PlaceOrderAsyncWithHttpInfo (Order body = null)
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Order>> PlaceOrderAsyncWithHttpInfo (Order body)
|
||||
{
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null)
|
||||
throw new ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder");
|
||||
|
||||
var localVarPath = "/store/order";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
@@ -1213,8 +806,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -1232,16 +825,6 @@ namespace IO.Swagger.Api
|
||||
localVarPostBody = body; // byte array
|
||||
}
|
||||
|
||||
// authentication (test_api_client_id) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_id")))
|
||||
{
|
||||
localVarHeaderParams["x-test_api_client_id"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_id");
|
||||
}
|
||||
// authentication (test_api_client_secret) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_secret")))
|
||||
{
|
||||
localVarHeaderParams["x-test_api_client_secret"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_secret");
|
||||
}
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
|
||||
@@ -22,9 +22,9 @@ namespace IO.Swagger.Api
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">Created user object (optional)</param>
|
||||
/// <param name="body">Created user object</param>
|
||||
/// <returns></returns>
|
||||
void CreateUser (User body = null);
|
||||
void CreateUser (User body);
|
||||
|
||||
/// <summary>
|
||||
/// Create user
|
||||
@@ -33,9 +33,9 @@ namespace IO.Swagger.Api
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">Created user object (optional)</param>
|
||||
/// <param name="body">Created user object</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> CreateUserWithHttpInfo (User body = null);
|
||||
ApiResponse<Object> CreateUserWithHttpInfo (User body);
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
@@ -43,9 +43,9 @@ namespace IO.Swagger.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">List of user object (optional)</param>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
void CreateUsersWithArrayInput (List<User> body = null);
|
||||
void CreateUsersWithArrayInput (List<User> body);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@@ -54,9 +54,9 @@ namespace IO.Swagger.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">List of user object (optional)</param>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> CreateUsersWithArrayInputWithHttpInfo (List<User> body = null);
|
||||
ApiResponse<Object> CreateUsersWithArrayInputWithHttpInfo (List<User> body);
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
@@ -64,9 +64,9 @@ namespace IO.Swagger.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">List of user object (optional)</param>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
void CreateUsersWithListInput (List<User> body = null);
|
||||
void CreateUsersWithListInput (List<User> body);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@@ -75,9 +75,9 @@ namespace IO.Swagger.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">List of user object (optional)</param>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> CreateUsersWithListInputWithHttpInfo (List<User> body = null);
|
||||
ApiResponse<Object> CreateUsersWithListInputWithHttpInfo (List<User> body);
|
||||
/// <summary>
|
||||
/// Delete user
|
||||
/// </summary>
|
||||
@@ -127,10 +127,10 @@ namespace IO.Swagger.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login (optional)</param>
|
||||
/// <param name="password">The password for login in clear text (optional)</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <returns>string</returns>
|
||||
string LoginUser (string username = null, string password = null);
|
||||
string LoginUser (string username, string password);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
@@ -139,10 +139,10 @@ namespace IO.Swagger.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login (optional)</param>
|
||||
/// <param name="password">The password for login in clear text (optional)</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <returns>ApiResponse of string</returns>
|
||||
ApiResponse<string> LoginUserWithHttpInfo (string username = null, string password = null);
|
||||
ApiResponse<string> LoginUserWithHttpInfo (string username, string password);
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
/// </summary>
|
||||
@@ -170,9 +170,9 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="body">Updated user object (optional)</param>
|
||||
/// <param name="body">Updated user object</param>
|
||||
/// <returns></returns>
|
||||
void UpdateUser (string username, User body = null);
|
||||
void UpdateUser (string username, User body);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user
|
||||
@@ -182,9 +182,9 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="body">Updated user object (optional)</param>
|
||||
/// <param name="body">Updated user object</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> UpdateUserWithHttpInfo (string username, User body = null);
|
||||
ApiResponse<Object> UpdateUserWithHttpInfo (string username, User body);
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
@@ -194,9 +194,9 @@ namespace IO.Swagger.Api
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">Created user object (optional)</param>
|
||||
/// <param name="body">Created user object</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task CreateUserAsync (User body = null);
|
||||
System.Threading.Tasks.Task CreateUserAsync (User body);
|
||||
|
||||
/// <summary>
|
||||
/// Create user
|
||||
@@ -205,9 +205,9 @@ namespace IO.Swagger.Api
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">Created user object (optional)</param>
|
||||
/// <param name="body">Created user object</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUserAsyncWithHttpInfo (User body = null);
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUserAsyncWithHttpInfo (User body);
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
@@ -215,9 +215,9 @@ namespace IO.Swagger.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">List of user object (optional)</param>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body = null);
|
||||
System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@@ -226,9 +226,9 @@ namespace IO.Swagger.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">List of user object (optional)</param>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithArrayInputAsyncWithHttpInfo (List<User> body = null);
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithArrayInputAsyncWithHttpInfo (List<User> body);
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
@@ -236,9 +236,9 @@ namespace IO.Swagger.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">List of user object (optional)</param>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body = null);
|
||||
System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@@ -247,9 +247,9 @@ namespace IO.Swagger.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">List of user object (optional)</param>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithListInputAsyncWithHttpInfo (List<User> body = null);
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithListInputAsyncWithHttpInfo (List<User> body);
|
||||
/// <summary>
|
||||
/// Delete user
|
||||
/// </summary>
|
||||
@@ -299,10 +299,10 @@ namespace IO.Swagger.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login (optional)</param>
|
||||
/// <param name="password">The password for login in clear text (optional)</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <returns>Task of string</returns>
|
||||
System.Threading.Tasks.Task<string> LoginUserAsync (string username = null, string password = null);
|
||||
System.Threading.Tasks.Task<string> LoginUserAsync (string username, string password);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
@@ -311,10 +311,10 @@ namespace IO.Swagger.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login (optional)</param>
|
||||
/// <param name="password">The password for login in clear text (optional)</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <returns>Task of ApiResponse (string)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<string>> LoginUserAsyncWithHttpInfo (string username = null, string password = null);
|
||||
System.Threading.Tasks.Task<ApiResponse<string>> LoginUserAsyncWithHttpInfo (string username, string password);
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
/// </summary>
|
||||
@@ -342,9 +342,9 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="body">Updated user object (optional)</param>
|
||||
/// <param name="body">Updated user object</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task UpdateUserAsync (string username, User body = null);
|
||||
System.Threading.Tasks.Task UpdateUserAsync (string username, User body);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user
|
||||
@@ -354,9 +354,9 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="body">Updated user object (optional)</param>
|
||||
/// <param name="body">Updated user object</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> UpdateUserAsyncWithHttpInfo (string username, User body = null);
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> UpdateUserAsyncWithHttpInfo (string username, User body);
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
@@ -451,9 +451,9 @@ namespace IO.Swagger.Api
|
||||
/// Create user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">Created user object (optional)</param>
|
||||
/// <param name="body">Created user object</param>
|
||||
/// <returns></returns>
|
||||
public void CreateUser (User body = null)
|
||||
public void CreateUser (User body)
|
||||
{
|
||||
CreateUserWithHttpInfo(body);
|
||||
}
|
||||
@@ -462,10 +462,13 @@ namespace IO.Swagger.Api
|
||||
/// Create user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">Created user object (optional)</param>
|
||||
/// <param name="body">Created user object</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public ApiResponse<Object> CreateUserWithHttpInfo (User body = null)
|
||||
public ApiResponse<Object> CreateUserWithHttpInfo (User body)
|
||||
{
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null)
|
||||
throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser");
|
||||
|
||||
var localVarPath = "/user";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
@@ -482,8 +485,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -524,9 +527,9 @@ namespace IO.Swagger.Api
|
||||
/// Create user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">Created user object (optional)</param>
|
||||
/// <param name="body">Created user object</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task CreateUserAsync (User body = null)
|
||||
public async System.Threading.Tasks.Task CreateUserAsync (User body)
|
||||
{
|
||||
await CreateUserAsyncWithHttpInfo(body);
|
||||
|
||||
@@ -536,10 +539,13 @@ namespace IO.Swagger.Api
|
||||
/// Create user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">Created user object (optional)</param>
|
||||
/// <param name="body">Created user object</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> CreateUserAsyncWithHttpInfo (User body = null)
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> CreateUserAsyncWithHttpInfo (User body)
|
||||
{
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null)
|
||||
throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser");
|
||||
|
||||
var localVarPath = "/user";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
@@ -556,8 +562,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -598,9 +604,9 @@ namespace IO.Swagger.Api
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">List of user object (optional)</param>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
public void CreateUsersWithArrayInput (List<User> body = null)
|
||||
public void CreateUsersWithArrayInput (List<User> body)
|
||||
{
|
||||
CreateUsersWithArrayInputWithHttpInfo(body);
|
||||
}
|
||||
@@ -609,10 +615,13 @@ namespace IO.Swagger.Api
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">List of user object (optional)</param>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public ApiResponse<Object> CreateUsersWithArrayInputWithHttpInfo (List<User> body = null)
|
||||
public ApiResponse<Object> CreateUsersWithArrayInputWithHttpInfo (List<User> body)
|
||||
{
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null)
|
||||
throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput");
|
||||
|
||||
var localVarPath = "/user/createWithArray";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
@@ -629,8 +638,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -671,9 +680,9 @@ namespace IO.Swagger.Api
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">List of user object (optional)</param>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body = null)
|
||||
public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body)
|
||||
{
|
||||
await CreateUsersWithArrayInputAsyncWithHttpInfo(body);
|
||||
|
||||
@@ -683,10 +692,13 @@ namespace IO.Swagger.Api
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">List of user object (optional)</param>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithArrayInputAsyncWithHttpInfo (List<User> body = null)
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithArrayInputAsyncWithHttpInfo (List<User> body)
|
||||
{
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null)
|
||||
throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput");
|
||||
|
||||
var localVarPath = "/user/createWithArray";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
@@ -703,8 +715,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -745,9 +757,9 @@ namespace IO.Swagger.Api
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">List of user object (optional)</param>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
public void CreateUsersWithListInput (List<User> body = null)
|
||||
public void CreateUsersWithListInput (List<User> body)
|
||||
{
|
||||
CreateUsersWithListInputWithHttpInfo(body);
|
||||
}
|
||||
@@ -756,10 +768,13 @@ namespace IO.Swagger.Api
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">List of user object (optional)</param>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public ApiResponse<Object> CreateUsersWithListInputWithHttpInfo (List<User> body = null)
|
||||
public ApiResponse<Object> CreateUsersWithListInputWithHttpInfo (List<User> body)
|
||||
{
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null)
|
||||
throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput");
|
||||
|
||||
var localVarPath = "/user/createWithList";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
@@ -776,8 +791,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -818,9 +833,9 @@ namespace IO.Swagger.Api
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">List of user object (optional)</param>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body = null)
|
||||
public async System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body)
|
||||
{
|
||||
await CreateUsersWithListInputAsyncWithHttpInfo(body);
|
||||
|
||||
@@ -830,10 +845,13 @@ namespace IO.Swagger.Api
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body">List of user object (optional)</param>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithListInputAsyncWithHttpInfo (List<User> body = null)
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithListInputAsyncWithHttpInfo (List<User> body)
|
||||
{
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null)
|
||||
throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput");
|
||||
|
||||
var localVarPath = "/user/createWithList";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
@@ -850,8 +868,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -926,8 +944,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -938,13 +956,6 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (username != null) localVarPathParams.Add("username", Configuration.ApiClient.ParameterToString(username)); // path parameter
|
||||
|
||||
// authentication (test_http_basic) required
|
||||
// http basic authentication required
|
||||
if (!String.IsNullOrEmpty(Configuration.Username) || !String.IsNullOrEmpty(Configuration.Password))
|
||||
{
|
||||
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(Configuration.Username + ":" + Configuration.Password);
|
||||
}
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||
@@ -1003,8 +1014,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -1015,12 +1026,6 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (username != null) localVarPathParams.Add("username", Configuration.ApiClient.ParameterToString(username)); // path parameter
|
||||
|
||||
// authentication (test_http_basic) required
|
||||
// http basic authentication required
|
||||
if (!String.IsNullOrEmpty(Configuration.Username) || !String.IsNullOrEmpty(Configuration.Password))
|
||||
{
|
||||
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(Configuration.Username + ":" + Configuration.Password);
|
||||
}
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
@@ -1079,8 +1084,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -1150,8 +1155,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -1185,10 +1190,10 @@ namespace IO.Swagger.Api
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login (optional)</param>
|
||||
/// <param name="password">The password for login in clear text (optional)</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <returns>string</returns>
|
||||
public string LoginUser (string username = null, string password = null)
|
||||
public string LoginUser (string username, string password)
|
||||
{
|
||||
ApiResponse<string> localVarResponse = LoginUserWithHttpInfo(username, password);
|
||||
return localVarResponse.Data;
|
||||
@@ -1198,11 +1203,17 @@ namespace IO.Swagger.Api
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login (optional)</param>
|
||||
/// <param name="password">The password for login in clear text (optional)</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <returns>ApiResponse of string</returns>
|
||||
public ApiResponse< string > LoginUserWithHttpInfo (string username = null, string password = null)
|
||||
public ApiResponse< string > LoginUserWithHttpInfo (string username, string password)
|
||||
{
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null)
|
||||
throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser");
|
||||
// verify the required parameter 'password' is set
|
||||
if (password == null)
|
||||
throw new ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser");
|
||||
|
||||
var localVarPath = "/user/login";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
@@ -1219,8 +1230,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -1255,10 +1266,10 @@ namespace IO.Swagger.Api
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login (optional)</param>
|
||||
/// <param name="password">The password for login in clear text (optional)</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <returns>Task of string</returns>
|
||||
public async System.Threading.Tasks.Task<string> LoginUserAsync (string username = null, string password = null)
|
||||
public async System.Threading.Tasks.Task<string> LoginUserAsync (string username, string password)
|
||||
{
|
||||
ApiResponse<string> localVarResponse = await LoginUserAsyncWithHttpInfo(username, password);
|
||||
return localVarResponse.Data;
|
||||
@@ -1269,11 +1280,17 @@ namespace IO.Swagger.Api
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login (optional)</param>
|
||||
/// <param name="password">The password for login in clear text (optional)</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <returns>Task of ApiResponse (string)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<string>> LoginUserAsyncWithHttpInfo (string username = null, string password = null)
|
||||
public async System.Threading.Tasks.Task<ApiResponse<string>> LoginUserAsyncWithHttpInfo (string username, string password)
|
||||
{
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null)
|
||||
throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser");
|
||||
// verify the required parameter 'password' is set
|
||||
if (password == null)
|
||||
throw new ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser");
|
||||
|
||||
var localVarPath = "/user/login";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
@@ -1290,8 +1307,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -1355,8 +1372,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -1419,8 +1436,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -1454,9 +1471,9 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="body">Updated user object (optional)</param>
|
||||
/// <param name="body">Updated user object</param>
|
||||
/// <returns></returns>
|
||||
public void UpdateUser (string username, User body = null)
|
||||
public void UpdateUser (string username, User body)
|
||||
{
|
||||
UpdateUserWithHttpInfo(username, body);
|
||||
}
|
||||
@@ -1466,13 +1483,16 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="body">Updated user object (optional)</param>
|
||||
/// <param name="body">Updated user object</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public ApiResponse<Object> UpdateUserWithHttpInfo (string username, User body = null)
|
||||
public ApiResponse<Object> UpdateUserWithHttpInfo (string username, User body)
|
||||
{
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null)
|
||||
throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser");
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null)
|
||||
throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser");
|
||||
|
||||
var localVarPath = "/user/{username}";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
@@ -1489,8 +1509,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
@@ -1533,9 +1553,9 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="body">Updated user object (optional)</param>
|
||||
/// <param name="body">Updated user object</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task UpdateUserAsync (string username, User body = null)
|
||||
public async System.Threading.Tasks.Task UpdateUserAsync (string username, User body)
|
||||
{
|
||||
await UpdateUserAsyncWithHttpInfo(username, body);
|
||||
|
||||
@@ -1546,13 +1566,16 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="body">Updated user object (optional)</param>
|
||||
/// <param name="body">Updated user object</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> UpdateUserAsyncWithHttpInfo (string username, User body = null)
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> UpdateUserAsyncWithHttpInfo (string username, User body)
|
||||
{
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null)
|
||||
throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser");
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null)
|
||||
throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser");
|
||||
|
||||
var localVarPath = "/user/{username}";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
@@ -1569,8 +1592,8 @@ namespace IO.Swagger.Api
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"application/xml"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace IO.Swagger.Model
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class ApiResponse : IEquatable<ApiResponse>
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApiResponse" /> class.
|
||||
/// Initializes a new instance of the <see cref="ApiResponse" />class.
|
||||
/// </summary>
|
||||
/// <param name="Code">Code.</param>
|
||||
/// <param name="Type">Type.</param>
|
||||
/// <param name="Message">Message.</param>
|
||||
|
||||
public ApiResponse(int? Code = null, string Type = null, string Message = null)
|
||||
{
|
||||
this.Code = Code;
|
||||
this.Type = Type;
|
||||
this.Message = Message;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Code
|
||||
/// </summary>
|
||||
[DataMember(Name="code", EmitDefaultValue=false)]
|
||||
public int? Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Type
|
||||
/// </summary>
|
||||
[DataMember(Name="type", EmitDefaultValue=false)]
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Message
|
||||
/// </summary>
|
||||
[DataMember(Name="message", EmitDefaultValue=false)]
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ApiResponse {\n");
|
||||
sb.Append(" Code: ").Append(Code).Append("\n");
|
||||
sb.Append(" Type: ").Append(Type).Append("\n");
|
||||
sb.Append(" Message: ").Append(Message).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="obj">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
// credit: http://stackoverflow.com/a/10454552/677735
|
||||
return this.Equals(obj as ApiResponse);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if ApiResponse instances are equal
|
||||
/// </summary>
|
||||
/// <param name="other">Instance of ApiResponse to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(ApiResponse other)
|
||||
{
|
||||
// credit: http://stackoverflow.com/a/10454552/677735
|
||||
if (other == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Code == other.Code ||
|
||||
this.Code != null &&
|
||||
this.Code.Equals(other.Code)
|
||||
) &&
|
||||
(
|
||||
this.Type == other.Type ||
|
||||
this.Type != null &&
|
||||
this.Type.Equals(other.Type)
|
||||
) &&
|
||||
(
|
||||
this.Message == other.Message ||
|
||||
this.Message != null &&
|
||||
this.Message.Equals(other.Message)
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
// credit: http://stackoverflow.com/a/263416/677735
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hash = 41;
|
||||
// Suitable nullity checks etc, of course :)
|
||||
if (this.Code != null)
|
||||
hash = hash * 59 + this.Code.GetHashCode();
|
||||
if (this.Type != null)
|
||||
hash = hash * 59 + this.Type.GetHashCode();
|
||||
if (this.Message != null)
|
||||
hash = hash * 59 + this.Message.GetHashCode();
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -47,19 +47,29 @@ namespace IO.Swagger.Model
|
||||
/// Initializes a new instance of the <see cref="Order" /> class.
|
||||
/// Initializes a new instance of the <see cref="Order" />class.
|
||||
/// </summary>
|
||||
/// <param name="Id">Id.</param>
|
||||
/// <param name="PetId">PetId.</param>
|
||||
/// <param name="Quantity">Quantity.</param>
|
||||
/// <param name="ShipDate">ShipDate.</param>
|
||||
/// <param name="Status">Order Status.</param>
|
||||
/// <param name="Complete">Complete.</param>
|
||||
/// <param name="Complete">Complete (default to false).</param>
|
||||
|
||||
public Order(long? PetId = null, int? Quantity = null, DateTime? ShipDate = null, StatusEnum? Status = null, bool? Complete = null)
|
||||
public Order(long? Id = null, long? PetId = null, int? Quantity = null, DateTime? ShipDate = null, StatusEnum? Status = null, bool? Complete = null)
|
||||
{
|
||||
this.Id = Id;
|
||||
this.PetId = PetId;
|
||||
this.Quantity = Quantity;
|
||||
this.ShipDate = ShipDate;
|
||||
this.Status = Status;
|
||||
this.Complete = Complete;
|
||||
// use default value if no "Complete" provided
|
||||
if (Complete == null)
|
||||
{
|
||||
this.Complete = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Complete = Complete;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -68,7 +78,7 @@ namespace IO.Swagger.Model
|
||||
/// Gets or Sets Id
|
||||
/// </summary>
|
||||
[DataMember(Name="id", EmitDefaultValue=false)]
|
||||
public long? Id { get; private set; }
|
||||
public long? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets PetId
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Cat.cs" />
|
||||
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Dog.cs" />
|
||||
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\FormatTest.cs" />
|
||||
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\ApiResponse.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
|
||||
@@ -2,9 +2,27 @@
|
||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
|
||||
<MonoDevelop.Ide.Workbench ActiveDocument="TestPet.cs">
|
||||
<Files>
|
||||
<File FileName="TestPet.cs" Line="216" Column="25" />
|
||||
<File FileName="TestOrder.cs" Line="1" Column="1" />
|
||||
<File FileName="TestPet.cs" Line="29" Column="39" />
|
||||
<File FileName="TestOrder.cs" Line="99" Column="6" />
|
||||
<File FileName="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs" Line="711" Column="1" />
|
||||
</Files>
|
||||
<Pads>
|
||||
<Pad Id="MonoDevelop.NUnit.TestPad">
|
||||
<State name="__root__">
|
||||
<Node name="SwaggerClientTest" expanded="True">
|
||||
<Node name="SwaggerClientTest" expanded="True">
|
||||
<Node name="SwaggerClientTest" expanded="True">
|
||||
<Node name="TestPet" expanded="True">
|
||||
<Node name="TestPet" expanded="True">
|
||||
<Node name="TestGetPetByIdAsyncWithHttpInfo" selected="True" />
|
||||
</Node>
|
||||
</Node>
|
||||
</Node>
|
||||
</Node>
|
||||
</Node>
|
||||
</State>
|
||||
</Pad>
|
||||
</Pads>
|
||||
</MonoDevelop.Ide.Workbench>
|
||||
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
<BreakpointStore />
|
||||
|
||||
@@ -73,6 +73,9 @@ namespace SwaggerClientTest.TestOrder
|
||||
|
||||
}
|
||||
|
||||
/* comment out the test case as the method is not defined in original petstore spec
|
||||
* we will re-enable this after updating the petstore server
|
||||
*
|
||||
/// <summary>
|
||||
/// Test GetInvetoryInObject
|
||||
/// </summary>
|
||||
@@ -93,7 +96,7 @@ namespace SwaggerClientTest.TestOrder
|
||||
Assert.IsInstanceOf (typeof(int?), Int32.Parse(entry.Value));
|
||||
}
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,6 +158,9 @@ namespace SwaggerClientTest.TestPet
|
||||
|
||||
}
|
||||
|
||||
/* comment out the test case as the method is not defined in original petstore spec
|
||||
* we will re-enable this after updating the petstore server
|
||||
*
|
||||
/// <summary>
|
||||
/// Test GetPetByIdInObject
|
||||
/// </summary>
|
||||
@@ -187,8 +190,11 @@ namespace SwaggerClientTest.TestPet
|
||||
Assert.AreEqual (56, (int)category ["id"]);
|
||||
Assert.AreEqual ("sample category name2", (string) category["name"]);
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
/* comment out the test case as the method is not defined in original petstore spec
|
||||
* we will re-enable this after updating the petstore server
|
||||
*
|
||||
/// <summary>
|
||||
/// Test GetPetByIdWithByteArray
|
||||
/// </summary>
|
||||
@@ -201,8 +207,11 @@ namespace SwaggerClientTest.TestPet
|
||||
PetApi petApi = new PetApi (c1);
|
||||
byte[] response = petApi.PetPetIdtestingByteArraytrueGet (petId);
|
||||
Assert.IsInstanceOf<byte[]> (response, "Response is byte array");
|
||||
}
|
||||
}*/
|
||||
|
||||
/* comment out the test case as the method is not defined in original petstore spec
|
||||
* we will re-enable this after updating the petstore server
|
||||
*
|
||||
/// <summary>
|
||||
/// Test AddPetUsingByteArray
|
||||
/// </summary>
|
||||
@@ -216,7 +225,7 @@ namespace SwaggerClientTest.TestPet
|
||||
Pet p = createPet ();
|
||||
byte[] petByteArray = GetBytes ((string)petApi.Configuration.ApiClient.Serialize (p));
|
||||
petApi.AddPetUsingByteArray (petByteArray);
|
||||
}
|
||||
}*/
|
||||
|
||||
/// <summary>
|
||||
/// Test UpdatePetWithForm
|
||||
@@ -225,7 +234,7 @@ namespace SwaggerClientTest.TestPet
|
||||
public void TestUpdatePetWithForm ()
|
||||
{
|
||||
PetApi petApi = new PetApi ();
|
||||
petApi.UpdatePetWithForm (petId.ToString(), "new form name", "pending");
|
||||
petApi.UpdatePetWithForm (petId, "new form name", "pending");
|
||||
|
||||
Pet response = petApi.GetPetById (petId);
|
||||
Assert.IsInstanceOf<Pet> (response, "Response is a Pet");
|
||||
@@ -239,7 +248,7 @@ namespace SwaggerClientTest.TestPet
|
||||
Assert.AreEqual (56, response.Category.Id);
|
||||
|
||||
// test optional parameter
|
||||
petApi.UpdatePetWithForm (petId.ToString(), "new form name2");
|
||||
petApi.UpdatePetWithForm (petId, "new form name2");
|
||||
Pet response2 = petApi.GetPetById (petId);
|
||||
Assert.AreEqual ("new form name2", response2.Name);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttribute.cs
|
||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.swagger-logo.png
|
||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/Newtonsoft.Json.dll
|
||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/nunit.framework.dll
|
||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/RestSharp.dll
|
||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll.mdb
|
||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll
|
||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll
|
||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll.mdb
|
||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/Newtonsoft.Json.dll
|
||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/nunit.framework.dll
|
||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/RestSharp.dll
|
||||
|
||||
Reference in New Issue
Block a user