forked from loafle/openapi-generator-original
adding csharp documentation
This commit is contained in:
parent
3aeef74dd0
commit
ffff0ab535
@ -11,6 +11,7 @@ import io.swagger.codegen.SupportingFile;
|
||||
import io.swagger.codegen.CodegenProperty;
|
||||
import io.swagger.codegen.CodegenModel;
|
||||
import io.swagger.codegen.CodegenOperation;
|
||||
import io.swagger.codegen.CodegenParameter;
|
||||
import io.swagger.models.properties.*;
|
||||
import io.swagger.codegen.CliOption;
|
||||
import io.swagger.models.Model;
|
||||
@ -45,6 +46,8 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
||||
protected String packageCopyright = "No Copyright";
|
||||
protected String clientPackage = "IO.Swagger.Client";
|
||||
protected String localVariablePrefix = "";
|
||||
protected String apiDocPath = "docs/";
|
||||
protected String modelDocPath = "docs/";
|
||||
|
||||
protected String targetFramework = NET45;
|
||||
protected String targetFrameworkNuget = "net45";
|
||||
@ -62,6 +65,9 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
||||
modelTestTemplateFiles.put("model_test.mustache", ".cs");
|
||||
apiTestTemplateFiles.put("api_test.mustache", ".cs");
|
||||
|
||||
modelDocTemplateFiles.put("model_doc.mustache", ".md");
|
||||
apiDocTemplateFiles.put("api_doc.mustache", ".md");
|
||||
|
||||
// C# client default
|
||||
setSourceFolder("src" + File.separator + "main" + File.separator + "csharp");
|
||||
|
||||
@ -230,6 +236,9 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
||||
if (optionalProjectFileFlag) {
|
||||
supportingFiles.add(new SupportingFile("Project.mustache", packageFolder, clientPackage + ".csproj"));
|
||||
}
|
||||
|
||||
additionalProperties.put("apiDocPath", apiDocPath);
|
||||
additionalProperties.put("modelDocPath", modelDocPath);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -467,4 +476,20 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
||||
public void setSupportsUWP(Boolean supportsUWP){
|
||||
this.supportsUWP = supportsUWP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toModelDocFilename(String name) {
|
||||
return toModelFilename(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String apiDocFileFolder() {
|
||||
return (outputFolder + "/" + apiDocPath).replace('/', File.separatorChar);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String modelDocFileFolder() {
|
||||
return (outputFolder + "/" + modelDocPath).replace('/', File.separatorChar);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,87 @@
|
||||
# {{packageName}}.Api.{{classname}}{{#description}}
|
||||
{{description}}{{/description}}
|
||||
|
||||
All URIs are relative to *{{basePath}}*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}
|
||||
{{/operation}}{{/operations}}
|
||||
|
||||
{{#operations}}
|
||||
{{#operation}}
|
||||
# **{{{operationId}}}**
|
||||
> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||
|
||||
{{{summary}}}{{#notes}}
|
||||
|
||||
{{{notes}}}{{/notes}}
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using {{packageName}}.Api;
|
||||
using {{packageName}}.Client;
|
||||
using {{packageName}}.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class {{operationId}}Example
|
||||
{
|
||||
public void main(){
|
||||
{{#hasAuthMethods}}{{#authMethods}}{{#isBasic}}
|
||||
// Configure HTTP basic authorization: {{{name}}}
|
||||
Configuration.Default.Username = 'YOUR_USERNAME';
|
||||
Configuration.Default.Password = 'YOUR_PASSWORD';{{/isBasic}}{{#isApiKey}}
|
||||
// Configure API key authorization: {{{name}}}
|
||||
Configuration.Default.ApiKey.Add('{{{keyParamName}}}', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Configuration.Default.ApiKeyPrefix.Add('{{{keyParamName}}}', 'BEARER');{{/isApiKey}}{{#isOAuth}}
|
||||
// Configure OAuth2 access token for authorization: {{{name}}}
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';{{/isOAuth}}{{/authMethods}}
|
||||
{{/hasAuthMethods}}
|
||||
|
||||
var apiInstance = new {{classname}}();
|
||||
{{#allParams}}
|
||||
{{#isPrimitiveType}}
|
||||
var {{paramName}} = {{example}}; // {{{dataType}}} | {{{description}}}
|
||||
{{/isPrimitiveType}}
|
||||
{{^isPrimitiveType}}
|
||||
var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}
|
||||
{{/isPrimitiveType}}
|
||||
{{/allParams}}
|
||||
|
||||
try {
|
||||
{{#returnType}}{{returnType}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
|
||||
Debug.WriteLine(result);{{/returnType}}
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling {{classname}}.{{operationId}}: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}
|
||||
{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
|
||||
{{/allParams}}
|
||||
|
||||
### Return type
|
||||
|
||||
{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}}
|
||||
|
||||
### Authorization
|
||||
|
||||
{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}}
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: {{#consumes}}{{mediaType}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
|
||||
- **Accept**: {{#produces}}{{mediaType}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}}
|
||||
|
||||
{{/operation}}
|
||||
{{/operations}}
|
@ -0,0 +1,10 @@
|
||||
{{#models}}{{#model}}# {{classname}}
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
||||
{{/vars}}
|
||||
|
||||
{{/model}}{{/models}}
|
@ -0,0 +1,64 @@
|
||||
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 Animal
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class AnimalTests
|
||||
{
|
||||
private Animal instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
instance = new Animal();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of Animal
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void AnimalInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<Animal> (instance, "instance is a Animal");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'ClassName'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ClassNameTest()
|
||||
{
|
||||
// TODO: unit test for the property 'ClassName'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
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 Cat
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class CatTests
|
||||
{
|
||||
private Cat instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
instance = new Cat();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of Cat
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void CatInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<Cat> (instance, "instance is a Cat");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'ClassName'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ClassNameTest()
|
||||
{
|
||||
// TODO: unit test for the property 'ClassName'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Declawed'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void DeclawedTest()
|
||||
{
|
||||
// TODO: unit test for the property 'Declawed'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
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 Dog
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class DogTests
|
||||
{
|
||||
private Dog instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
instance = new Dog();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of Dog
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void DogInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<Dog> (instance, "instance is a Dog");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'ClassName'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ClassNameTest()
|
||||
{
|
||||
// TODO: unit test for the property 'ClassName'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Breed'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void BreedTest()
|
||||
{
|
||||
// TODO: unit test for the property 'Breed'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,152 @@
|
||||
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 FormatTest
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class FormatTestTests
|
||||
{
|
||||
private FormatTest instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
instance = new FormatTest();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of FormatTest
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void FormatTestInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<FormatTest> (instance, "instance is a FormatTest");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Integer'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void IntegerTest()
|
||||
{
|
||||
// TODO: unit test for the property 'Integer'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Int32'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void Int32Test()
|
||||
{
|
||||
// TODO: unit test for the property 'Int32'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Int64'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void Int64Test()
|
||||
{
|
||||
// TODO: unit test for the property 'Int64'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Number'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void NumberTest()
|
||||
{
|
||||
// TODO: unit test for the property 'Number'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property '_Float'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void _FloatTest()
|
||||
{
|
||||
// TODO: unit test for the property '_Float'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property '_Double'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void _DoubleTest()
|
||||
{
|
||||
// TODO: unit test for the property '_Double'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property '_String'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void _StringTest()
|
||||
{
|
||||
// TODO: unit test for the property '_String'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property '_Byte'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void _ByteTest()
|
||||
{
|
||||
// TODO: unit test for the property '_Byte'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Binary'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void BinaryTest()
|
||||
{
|
||||
// TODO: unit test for the property 'Binary'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Date'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void DateTest()
|
||||
{
|
||||
// TODO: unit test for the property 'Date'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'DateTime'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void DateTimeTest()
|
||||
{
|
||||
// TODO: unit test for the property 'DateTime'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Password'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void PasswordTest()
|
||||
{
|
||||
// TODO: unit test for the property 'Password'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -51,12 +51,20 @@ namespace IO.Swagger.Test
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Tags'
|
||||
/// Test the property 'PhotoUrls'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TagsTest()
|
||||
public void PhotoUrlsTest()
|
||||
{
|
||||
// TODO: unit test for the property 'Tags'
|
||||
// TODO: unit test for the property 'PhotoUrls'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Name'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void NameTest()
|
||||
{
|
||||
// TODO: unit test for the property 'Name'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Id'
|
||||
@ -75,6 +83,14 @@ namespace IO.Swagger.Test
|
||||
// TODO: unit test for the property 'Category'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Tags'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TagsTest()
|
||||
{
|
||||
// TODO: unit test for the property 'Tags'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Status'
|
||||
/// </summary>
|
||||
[Test]
|
||||
@ -82,22 +98,6 @@ namespace IO.Swagger.Test
|
||||
{
|
||||
// TODO: unit test for the property 'Status'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Name'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void NameTest()
|
||||
{
|
||||
// TODO: unit test for the property 'Name'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'PhotoUrls'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void PhotoUrlsTest()
|
||||
{
|
||||
// TODO: unit test for the property 'PhotoUrls'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,11 @@
|
||||
# Animal
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ClassName** | **string** | |
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,12 @@
|
||||
# Cat
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ClassName** | **string** | |
|
||||
**Declawed** | **bool?** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,12 @@
|
||||
# Category
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**Name** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,12 @@
|
||||
# Dog
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ClassName** | **string** | |
|
||||
**Breed** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,22 @@
|
||||
# FormatTest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Integer** | **int?** | | [optional]
|
||||
**Int32** | **int?** | | [optional]
|
||||
**Int64** | **long?** | | [optional]
|
||||
**Number** | **double?** | |
|
||||
**_Float** | **float?** | | [optional]
|
||||
**_Double** | **double?** | | [optional]
|
||||
**_String** | **string** | | [optional]
|
||||
**_Byte** | **byte[]** | | [optional]
|
||||
**Binary** | **byte[]** | | [optional]
|
||||
**Date** | **DateTime?** | | [optional]
|
||||
**DateTime** | **DateTime?** | | [optional]
|
||||
**Password** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,16 @@
|
||||
# InlineResponse200
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**PhotoUrls** | **List<string>** | | [optional]
|
||||
**Name** | **string** | | [optional]
|
||||
**Id** | **long?** | |
|
||||
**Category** | **Object** | | [optional]
|
||||
**Tags** | [**List<Tag>**](Tag.md) | | [optional]
|
||||
**Status** | **string** | pet status in the store | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,11 @@
|
||||
# Model200Response
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **int?** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,11 @@
|
||||
# ModelReturn
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Return** | **int?** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,12 @@
|
||||
# Name
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Name** | **int?** | |
|
||||
**SnakeCase** | **int?** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,16 @@
|
||||
# Order
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**PetId** | **long?** | | [optional]
|
||||
**Quantity** | **int?** | | [optional]
|
||||
**ShipDate** | **DateTime?** | | [optional]
|
||||
**Status** | **string** | Order Status | [optional]
|
||||
**Complete** | **bool?** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,16 @@
|
||||
# Pet
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**Category** | [**Category**](Category.md) | | [optional]
|
||||
**Name** | **string** | |
|
||||
**PhotoUrls** | **List<string>** | |
|
||||
**Tags** | [**List<Tag>**](Tag.md) | | [optional]
|
||||
**Status** | **string** | pet status in the store | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,684 @@
|
||||
# IO.Swagger.Api.PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**AddPet**](PetApi.md#AddPet) | **POST** /pet | Add a new pet to the store
|
||||
[**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
|
||||
|
||||
|
||||
# **AddPet**
|
||||
> AddPet(body)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class AddPetExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var body = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
|
||||
try {
|
||||
apiInstance.AddPet(body);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.AddPet: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **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 reuqest headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **DeletePet**
|
||||
> DeletePet(petId, apiKey)
|
||||
|
||||
Deletes a pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class DeletePetExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var petId = 789; // long? | Pet id to delete
|
||||
var apiKey = apiKey_example; // string |
|
||||
|
||||
try {
|
||||
apiInstance.DeletePet(petId, apiKey);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.DeletePet: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **long?**| Pet id to delete |
|
||||
**apiKey** | **string**| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **FindPetsByStatus**
|
||||
> List<Pet> FindPetsByStatus(status)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
Multiple status values can be provided with comma separated strings
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class FindPetsByStatusExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var status = new List<string>(); // List<string> | Status values that need to be considered for query
|
||||
|
||||
try {
|
||||
List<Pet> result = apiInstance.FindPetsByStatus(status);
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.FindPetsByStatus: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**List<string>**](string.md)| Status values that need to be considered for query | [optional] [default to available]
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **FindPetsByTags**
|
||||
> List<Pet> FindPetsByTags(tags)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class FindPetsByTagsExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var tags = new List<string>(); // List<string> | Tags to filter by
|
||||
|
||||
try {
|
||||
List<Pet> result = apiInstance.FindPetsByTags(tags);
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.FindPetsByTags: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**List<string>**](string.md)| Tags to filter by | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **GetPetById**
|
||||
> Pet GetPetById(petId)
|
||||
|
||||
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 GetPetByIdExample
|
||||
{
|
||||
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 {
|
||||
Pet result = apiInstance.GetPetById(petId);
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.GetPetById: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **long?**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Pet**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **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 reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **PetPetIdtestingByteArraytrueGet**
|
||||
> 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 reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **UpdatePet**
|
||||
> UpdatePet(body)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class UpdatePetExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var body = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
|
||||
try {
|
||||
apiInstance.UpdatePet(body);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.UpdatePet: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **UpdatePetWithForm**
|
||||
> UpdatePetWithForm(petId, name, status)
|
||||
|
||||
Updates a pet in the store with form data
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class UpdatePetWithFormExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var petId = petId_example; // string | ID of pet that needs to be updated
|
||||
var name = name_example; // string | Updated name of the pet
|
||||
var status = status_example; // string | Updated status of the pet
|
||||
|
||||
try {
|
||||
apiInstance.UpdatePetWithForm(petId, name, status);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.UpdatePetWithForm: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **string**| ID of pet that needs to be updated |
|
||||
**name** | **string**| Updated name of the pet | [optional]
|
||||
**status** | **string**| Updated status of the pet | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **UploadFile**
|
||||
> UploadFile(petId, additionalMetadata, file)
|
||||
|
||||
uploads an image
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class UploadFileExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var petId = 789; // long? | ID of pet to update
|
||||
var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server
|
||||
var file = new Stream(); // Stream | file to upload
|
||||
|
||||
try {
|
||||
apiInstance.UploadFile(petId, additionalMetadata, file);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **long?**| ID of pet to update |
|
||||
**additionalMetadata** | **string**| Additional data to pass to server | [optional]
|
||||
**file** | **Stream**| file to upload | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
@ -0,0 +1,11 @@
|
||||
# SpecialModelName
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**SpecialPropertyName** | **long?** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,378 @@
|
||||
# IO.Swagger.Api.StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**DeleteOrder**](StoreApi.md#DeleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
[**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
|
||||
|
||||
|
||||
# **DeleteOrder**
|
||||
> DeleteOrder(orderId)
|
||||
|
||||
Delete purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class DeleteOrderExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
var apiInstance = new StoreApi();
|
||||
var orderId = orderId_example; // string | ID of the order that needs to be deleted
|
||||
|
||||
try {
|
||||
apiInstance.DeleteOrder(orderId);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling StoreApi.DeleteOrder: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **string**| ID of the order that needs to be deleted |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **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 reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **GetInventory**
|
||||
> Dictionary<string, int?> GetInventory()
|
||||
|
||||
Returns pet inventories by status
|
||||
|
||||
Returns a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class GetInventoryExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
Configuration.Default.ApiKey.Add('api_key', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// Configuration.Default.ApiKeyPrefix.Add('api_key', 'BEARER');
|
||||
|
||||
var apiInstance = new StoreApi();
|
||||
|
||||
try {
|
||||
Dictionary<string, int?> result = apiInstance.GetInventory();
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling StoreApi.GetInventory: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**Dictionary<string, int?>**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **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 reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **GetOrderById**
|
||||
> Order GetOrderById(orderId)
|
||||
|
||||
Find purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class GetOrderByIdExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// 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
|
||||
|
||||
try {
|
||||
Order result = apiInstance.GetOrderById(orderId);
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling StoreApi.GetOrderById: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **string**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[test_api_key_query](../README.md#test_api_key_query), [test_api_key_header](../README.md#test_api_key_header)
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **PlaceOrder**
|
||||
> Order PlaceOrder(body)
|
||||
|
||||
Place an order for a pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class PlaceOrderExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// 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
|
||||
|
||||
try {
|
||||
Order result = apiInstance.PlaceOrder(body);
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling StoreApi.PlaceOrder: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**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 reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
@ -0,0 +1,12 @@
|
||||
# Tag
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**Name** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,18 @@
|
||||
# User
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**Username** | **string** | | [optional]
|
||||
**FirstName** | **string** | | [optional]
|
||||
**LastName** | **string** | | [optional]
|
||||
**Email** | **string** | | [optional]
|
||||
**Password** | **string** | | [optional]
|
||||
**Phone** | **string** | | [optional]
|
||||
**UserStatus** | **int?** | User Status | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,462 @@
|
||||
# IO.Swagger.Api.UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**CreateUser**](UserApi.md#CreateUser) | **POST** /user | Create user
|
||||
[**CreateUsersWithArrayInput**](UserApi.md#CreateUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
[**CreateUsersWithListInput**](UserApi.md#CreateUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
[**DeleteUser**](UserApi.md#DeleteUser) | **DELETE** /user/{username} | Delete user
|
||||
[**GetUserByName**](UserApi.md#GetUserByName) | **GET** /user/{username} | Get user by user name
|
||||
[**LoginUser**](UserApi.md#LoginUser) | **GET** /user/login | Logs user into the system
|
||||
[**LogoutUser**](UserApi.md#LogoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||
[**UpdateUser**](UserApi.md#UpdateUser) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
# **CreateUser**
|
||||
> CreateUser(body)
|
||||
|
||||
Create user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class CreateUserExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
var apiInstance = new UserApi();
|
||||
var body = new User(); // User | Created user object
|
||||
|
||||
try {
|
||||
apiInstance.CreateUser(body);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling UserApi.CreateUser: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**User**](User.md)| Created user object | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **CreateUsersWithArrayInput**
|
||||
> CreateUsersWithArrayInput(body)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class CreateUsersWithArrayInputExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
var apiInstance = new UserApi();
|
||||
var body = new List<User>(); // List<User> | List of user object
|
||||
|
||||
try {
|
||||
apiInstance.CreateUsersWithArrayInput(body);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling UserApi.CreateUsersWithArrayInput: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**List<User>**](User.md)| List of user object | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **CreateUsersWithListInput**
|
||||
> CreateUsersWithListInput(body)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class CreateUsersWithListInputExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
var apiInstance = new UserApi();
|
||||
var body = new List<User>(); // List<User> | List of user object
|
||||
|
||||
try {
|
||||
apiInstance.CreateUsersWithListInput(body);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling UserApi.CreateUsersWithListInput: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**List<User>**](User.md)| List of user object | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **DeleteUser**
|
||||
> DeleteUser(username)
|
||||
|
||||
Delete user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class DeleteUserExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
// 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
|
||||
|
||||
try {
|
||||
apiInstance.DeleteUser(username);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling UserApi.DeleteUser: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **string**| The name that needs to be deleted |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[test_http_basic](../README.md#test_http_basic)
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **GetUserByName**
|
||||
> User GetUserByName(username)
|
||||
|
||||
Get user by user name
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class GetUserByNameExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
var apiInstance = new UserApi();
|
||||
var username = username_example; // string | The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
try {
|
||||
User result = apiInstance.GetUserByName(username);
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling UserApi.GetUserByName: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **string**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
[**User**](User.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **LoginUser**
|
||||
> string LoginUser(username, password)
|
||||
|
||||
Logs user into the system
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class LoginUserExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
var apiInstance = new UserApi();
|
||||
var username = username_example; // string | The user name for login
|
||||
var password = password_example; // string | The password for login in clear text
|
||||
|
||||
try {
|
||||
string result = apiInstance.LoginUser(username, password);
|
||||
Debug.WriteLine(result);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling UserApi.LoginUser: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **string**| The user name for login | [optional]
|
||||
**password** | **string**| The password for login in clear text | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
**string**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **LogoutUser**
|
||||
> LogoutUser()
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class LogoutUserExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
var apiInstance = new UserApi();
|
||||
|
||||
try {
|
||||
apiInstance.LogoutUser();
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling UserApi.LogoutUser: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **UpdateUser**
|
||||
> UpdateUser(username, body)
|
||||
|
||||
Updated user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Module;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class UpdateUserExample
|
||||
{
|
||||
public void main(){
|
||||
|
||||
var apiInstance = new UserApi();
|
||||
var username = username_example; // string | name that need to be deleted
|
||||
var body = new User(); // User | Updated user object
|
||||
|
||||
try {
|
||||
apiInstance.UpdateUser(username, body);
|
||||
} catch (Exception e) {
|
||||
Debug.Print("Exception when calling UserApi.UpdateUser: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **string**| name that need to be deleted |
|
||||
**body** | [**User**](User.md)| Updated user object | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP reuqest headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
@ -1417,18 +1417,18 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter
|
||||
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
// oauth required
|
||||
if (!String.IsNullOrEmpty(Configuration.AccessToken))
|
||||
{
|
||||
localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken;
|
||||
}
|
||||
// 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,
|
||||
@ -1500,17 +1500,17 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter
|
||||
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
// authentication (petstore_auth) required
|
||||
// oauth required
|
||||
if (!String.IsNullOrEmpty(Configuration.AccessToken))
|
||||
{
|
||||
localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken;
|
||||
}
|
||||
// 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,
|
||||
@ -1581,18 +1581,18 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter
|
||||
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
// oauth required
|
||||
if (!String.IsNullOrEmpty(Configuration.AccessToken))
|
||||
{
|
||||
localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken;
|
||||
}
|
||||
// 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,
|
||||
@ -1664,17 +1664,17 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter
|
||||
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
// authentication (petstore_auth) required
|
||||
// oauth required
|
||||
if (!String.IsNullOrEmpty(Configuration.AccessToken))
|
||||
{
|
||||
localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken;
|
||||
}
|
||||
// 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,
|
||||
@ -1745,18 +1745,18 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter
|
||||
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
// oauth required
|
||||
if (!String.IsNullOrEmpty(Configuration.AccessToken))
|
||||
{
|
||||
localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken;
|
||||
}
|
||||
// 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,
|
||||
@ -1828,17 +1828,17 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter
|
||||
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
// authentication (petstore_auth) required
|
||||
// oauth required
|
||||
if (!String.IsNullOrEmpty(Configuration.AccessToken))
|
||||
{
|
||||
localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken;
|
||||
}
|
||||
// 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,
|
||||
|
@ -978,18 +978,18 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter
|
||||
|
||||
// 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");
|
||||
}
|
||||
|
||||
// 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,
|
||||
@ -1061,16 +1061,16 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter
|
||||
|
||||
// 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");
|
||||
}
|
||||
// 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,
|
||||
|
@ -47,14 +47,14 @@ namespace IO.Swagger.Model
|
||||
/// Initializes a new instance of the <see cref="InlineResponse200" /> class.
|
||||
/// Initializes a new instance of the <see cref="InlineResponse200" />class.
|
||||
/// </summary>
|
||||
/// <param name="Tags">Tags.</param>
|
||||
/// <param name="PhotoUrls">PhotoUrls.</param>
|
||||
/// <param name="Name">Name.</param>
|
||||
/// <param name="Id">Id (required).</param>
|
||||
/// <param name="Category">Category.</param>
|
||||
/// <param name="Tags">Tags.</param>
|
||||
/// <param name="Status">pet status in the store.</param>
|
||||
/// <param name="Name">Name.</param>
|
||||
/// <param name="PhotoUrls">PhotoUrls.</param>
|
||||
|
||||
public InlineResponse200(List<Tag> Tags = null, long? Id = null, Object Category = null, StatusEnum? Status = null, string Name = null, List<string> PhotoUrls = null)
|
||||
public InlineResponse200(List<string> PhotoUrls = null, string Name = null, long? Id = null, Object Category = null, List<Tag> Tags = null, StatusEnum? Status = null)
|
||||
{
|
||||
// to ensure "Id" is required (not null)
|
||||
if (Id == null)
|
||||
@ -65,20 +65,26 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
this.Id = Id;
|
||||
}
|
||||
this.Tags = Tags;
|
||||
this.Category = Category;
|
||||
this.Status = Status;
|
||||
this.Name = Name;
|
||||
this.PhotoUrls = PhotoUrls;
|
||||
this.Name = Name;
|
||||
this.Category = Category;
|
||||
this.Tags = Tags;
|
||||
this.Status = Status;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Tags
|
||||
/// Gets or Sets PhotoUrls
|
||||
/// </summary>
|
||||
[DataMember(Name="tags", EmitDefaultValue=false)]
|
||||
public List<Tag> Tags { get; set; }
|
||||
[DataMember(Name="photoUrls", EmitDefaultValue=false)]
|
||||
public List<string> PhotoUrls { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name="name", EmitDefaultValue=false)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Id
|
||||
@ -93,16 +99,10 @@ namespace IO.Swagger.Model
|
||||
public Object Category { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// Gets or Sets Tags
|
||||
/// </summary>
|
||||
[DataMember(Name="name", EmitDefaultValue=false)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets PhotoUrls
|
||||
/// </summary>
|
||||
[DataMember(Name="photoUrls", EmitDefaultValue=false)]
|
||||
public List<string> PhotoUrls { get; set; }
|
||||
[DataMember(Name="tags", EmitDefaultValue=false)]
|
||||
public List<Tag> Tags { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -112,12 +112,12 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class InlineResponse200 {\n");
|
||||
sb.Append(" Tags: ").Append(Tags).Append("\n");
|
||||
sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" Id: ").Append(Id).Append("\n");
|
||||
sb.Append(" Category: ").Append(Category).Append("\n");
|
||||
sb.Append(" Tags: ").Append(Tags).Append("\n");
|
||||
sb.Append(" Status: ").Append(Status).Append("\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@ -155,9 +155,14 @@ namespace IO.Swagger.Model
|
||||
|
||||
return
|
||||
(
|
||||
this.Tags == other.Tags ||
|
||||
this.Tags != null &&
|
||||
this.Tags.SequenceEqual(other.Tags)
|
||||
this.PhotoUrls == other.PhotoUrls ||
|
||||
this.PhotoUrls != null &&
|
||||
this.PhotoUrls.SequenceEqual(other.PhotoUrls)
|
||||
) &&
|
||||
(
|
||||
this.Name == other.Name ||
|
||||
this.Name != null &&
|
||||
this.Name.Equals(other.Name)
|
||||
) &&
|
||||
(
|
||||
this.Id == other.Id ||
|
||||
@ -169,20 +174,15 @@ namespace IO.Swagger.Model
|
||||
this.Category != null &&
|
||||
this.Category.Equals(other.Category)
|
||||
) &&
|
||||
(
|
||||
this.Tags == other.Tags ||
|
||||
this.Tags != null &&
|
||||
this.Tags.SequenceEqual(other.Tags)
|
||||
) &&
|
||||
(
|
||||
this.Status == other.Status ||
|
||||
this.Status != null &&
|
||||
this.Status.Equals(other.Status)
|
||||
) &&
|
||||
(
|
||||
this.Name == other.Name ||
|
||||
this.Name != null &&
|
||||
this.Name.Equals(other.Name)
|
||||
) &&
|
||||
(
|
||||
this.PhotoUrls == other.PhotoUrls ||
|
||||
this.PhotoUrls != null &&
|
||||
this.PhotoUrls.SequenceEqual(other.PhotoUrls)
|
||||
);
|
||||
}
|
||||
|
||||
@ -197,18 +197,18 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
int hash = 41;
|
||||
// Suitable nullity checks etc, of course :)
|
||||
if (this.Tags != null)
|
||||
hash = hash * 59 + this.Tags.GetHashCode();
|
||||
if (this.PhotoUrls != null)
|
||||
hash = hash * 59 + this.PhotoUrls.GetHashCode();
|
||||
if (this.Name != null)
|
||||
hash = hash * 59 + this.Name.GetHashCode();
|
||||
if (this.Id != null)
|
||||
hash = hash * 59 + this.Id.GetHashCode();
|
||||
if (this.Category != null)
|
||||
hash = hash * 59 + this.Category.GetHashCode();
|
||||
if (this.Tags != null)
|
||||
hash = hash * 59 + this.Tags.GetHashCode();
|
||||
if (this.Status != null)
|
||||
hash = hash * 59 + this.Status.GetHashCode();
|
||||
if (this.Name != null)
|
||||
hash = hash * 59 + this.Name.GetHashCode();
|
||||
if (this.PhotoUrls != null)
|
||||
hash = hash * 59 + this.PhotoUrls.GetHashCode();
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user