forked from loafle/openapi-generator-original
[csharp-netcore]: Adding http response details in api_docs and making example snippet compilable (#3128)
* feat(csharp-documentation): Improving documentation and example * feat(csharp-documentation): Updating pet project * feat(csharp-documentation): Minor updates * feat(csharp-documentation): Updating pet project * feat(csharp): Updating pet project * feat(csharp-netcore): Updating pet project
This commit is contained in:
parent
b9451e91af
commit
2a5af92cdf
@ -80,7 +80,7 @@ Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-p
|
||||
## Getting Started
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using {{packageName}}.{{apiPackage}};
|
||||
using {{packageName}}.Client;
|
||||
@ -90,9 +90,10 @@ namespace Example
|
||||
{
|
||||
public class {{operationId}}Example
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}}
|
||||
Configuration.Default.BasePath = "{{{basePath}}}";
|
||||
{{#hasAuthMethods}}
|
||||
{{#authMethods}}
|
||||
{{#isBasic}}
|
||||
@ -113,7 +114,7 @@ namespace Example
|
||||
{{/authMethods}}
|
||||
|
||||
{{/hasAuthMethods}}
|
||||
var apiInstance = new {{classname}}();
|
||||
var apiInstance = new {{classname}}(Configuration.Default);
|
||||
{{#allParams}}
|
||||
{{#isPrimitiveType}}
|
||||
var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
|
||||
@ -128,12 +129,14 @@ namespace Example
|
||||
{{#summary}}
|
||||
// {{{.}}}
|
||||
{{/summary}}
|
||||
{{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
|
||||
{{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
|
||||
Debug.WriteLine(result);{{/returnType}}
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling {{classname}}.{{operationId}}: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ Method | HTTP request | Description
|
||||
{{#operation}}
|
||||
<a name="{{{operationIdLowerCase}}}"></a>
|
||||
# **{{{operationId}}}**
|
||||
> {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||
> {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||
|
||||
{{{summary}}}{{#notes}}
|
||||
|
||||
@ -20,7 +20,7 @@ Method | HTTP request | Description
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using {{packageName}}.{{apiPackage}};
|
||||
using {{packageName}}.Client;
|
||||
@ -30,8 +30,9 @@ namespace Example
|
||||
{
|
||||
public class {{operationId}}Example
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "{{{basePath}}}";
|
||||
{{#hasAuthMethods}}
|
||||
{{#authMethods}}
|
||||
{{#isBasic}}
|
||||
@ -52,7 +53,7 @@ namespace Example
|
||||
{{/authMethods}}
|
||||
|
||||
{{/hasAuthMethods}}
|
||||
var apiInstance = new {{classname}}();
|
||||
var apiInstance = new {{classname}}(Configuration.Default);
|
||||
{{#allParams}}
|
||||
{{#isPrimitiveType}}
|
||||
var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
|
||||
@ -67,12 +68,14 @@ namespace Example
|
||||
{{#summary}}
|
||||
// {{{.}}}
|
||||
{{/summary}}
|
||||
{{#returnType}}{{returnType}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
|
||||
{{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
|
||||
Debug.WriteLine(result);{{/returnType}}
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling {{classname}}.{{operationId}}: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -88,7 +91,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}}
|
||||
{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}}
|
||||
|
||||
### Authorization
|
||||
|
||||
@ -99,6 +102,15 @@ Name | Type | Description | Notes
|
||||
- **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
|
||||
- **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}}
|
||||
|
||||
{{#responses.0}}
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
{{#responses}}
|
||||
| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}} <br> {{/headers}}{{^headers.0}} - {{/headers.0}} |
|
||||
{{/responses}}
|
||||
{{/responses.0}}
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
{{/operation}}
|
||||
|
@ -48,7 +48,7 @@ using Org.OpenAPITools.Model;
|
||||
## Getting Started
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -58,10 +58,11 @@ namespace Example
|
||||
{
|
||||
public class Example
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
|
||||
var apiInstance = new AnotherFakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new AnotherFakeApi(Configuration.Default);
|
||||
var body = new ModelClient(); // ModelClient | client model
|
||||
|
||||
try
|
||||
@ -70,9 +71,11 @@ namespace Example
|
||||
ModelClient result = apiInstance.Call123TestSpecialTags(body);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ To test special tags and operation ID starting with number
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -27,9 +27,10 @@ namespace Example
|
||||
{
|
||||
public class Call123TestSpecialTagsExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new AnotherFakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new AnotherFakeApi(Configuration.Default);
|
||||
var body = new ModelClient(); // ModelClient | client model
|
||||
|
||||
try
|
||||
@ -38,9 +39,11 @@ namespace Example
|
||||
ModelClient result = apiInstance.Call123TestSpecialTags(body);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -66,5 +69,10 @@ No authorization required
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
|
@ -29,7 +29,7 @@ this route creates an XmlItem
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -39,9 +39,10 @@ namespace Example
|
||||
{
|
||||
public class CreateXmlItemExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var xmlItem = new XmlItem(); // XmlItem | XmlItem Body
|
||||
|
||||
try
|
||||
@ -49,9 +50,11 @@ namespace Example
|
||||
// creates an XmlItem
|
||||
apiInstance.CreateXmlItem(xmlItem);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.CreateXmlItem: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -77,6 +80,11 @@ No authorization required
|
||||
- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="fakeouterbooleanserialize"></a>
|
||||
@ -89,7 +97,7 @@ Test serialization of outer boolean types
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -99,9 +107,10 @@ namespace Example
|
||||
{
|
||||
public class FakeOuterBooleanSerializeExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var body = true; // bool? | Input boolean as post body (optional)
|
||||
|
||||
try
|
||||
@ -109,9 +118,11 @@ namespace Example
|
||||
bool result = apiInstance.FakeOuterBooleanSerialize(body);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -137,6 +148,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Output boolean | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="fakeoutercompositeserialize"></a>
|
||||
@ -149,7 +165,7 @@ Test serialization of object with outer number type
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -159,9 +175,10 @@ namespace Example
|
||||
{
|
||||
public class FakeOuterCompositeSerializeExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional)
|
||||
|
||||
try
|
||||
@ -169,9 +186,11 @@ namespace Example
|
||||
OuterComposite result = apiInstance.FakeOuterCompositeSerialize(body);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.FakeOuterCompositeSerialize: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -197,6 +216,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Output composite | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="fakeouternumberserialize"></a>
|
||||
@ -209,7 +233,7 @@ Test serialization of outer number types
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -219,9 +243,10 @@ namespace Example
|
||||
{
|
||||
public class FakeOuterNumberSerializeExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var body = 8.14; // decimal? | Input number as post body (optional)
|
||||
|
||||
try
|
||||
@ -229,9 +254,11 @@ namespace Example
|
||||
decimal result = apiInstance.FakeOuterNumberSerialize(body);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.FakeOuterNumberSerialize: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -257,6 +284,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Output number | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="fakeouterstringserialize"></a>
|
||||
@ -269,7 +301,7 @@ Test serialization of outer string types
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -279,9 +311,10 @@ namespace Example
|
||||
{
|
||||
public class FakeOuterStringSerializeExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var body = body_example; // string | Input string as post body (optional)
|
||||
|
||||
try
|
||||
@ -289,9 +322,11 @@ namespace Example
|
||||
string result = apiInstance.FakeOuterStringSerialize(body);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.FakeOuterStringSerialize: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -317,6 +352,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Output string | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="testbodywithfileschema"></a>
|
||||
@ -329,7 +369,7 @@ For this test, the body for this request much reference a schema named `File`.
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -339,18 +379,21 @@ namespace Example
|
||||
{
|
||||
public class TestBodyWithFileSchemaExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var body = new FileSchemaTestClass(); // FileSchemaTestClass |
|
||||
|
||||
try
|
||||
{
|
||||
apiInstance.TestBodyWithFileSchema(body);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestBodyWithFileSchema: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -376,6 +419,11 @@ No authorization required
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Success | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="testbodywithqueryparams"></a>
|
||||
@ -386,7 +434,7 @@ No authorization required
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -396,9 +444,10 @@ namespace Example
|
||||
{
|
||||
public class TestBodyWithQueryParamsExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var query = query_example; // string |
|
||||
var body = new User(); // User |
|
||||
|
||||
@ -406,9 +455,11 @@ namespace Example
|
||||
{
|
||||
apiInstance.TestBodyWithQueryParams(query, body);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestBodyWithQueryParams: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -435,6 +486,11 @@ No authorization required
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Success | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="testclientmodel"></a>
|
||||
@ -447,7 +503,7 @@ To test \"client\" model
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -457,9 +513,10 @@ namespace Example
|
||||
{
|
||||
public class TestClientModelExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var body = new ModelClient(); // ModelClient | client model
|
||||
|
||||
try
|
||||
@ -468,9 +525,11 @@ namespace Example
|
||||
ModelClient result = apiInstance.TestClientModel(body);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -496,6 +555,11 @@ No authorization required
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="testendpointparameters"></a>
|
||||
@ -508,7 +572,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -518,13 +582,14 @@ namespace Example
|
||||
{
|
||||
public class TestEndpointParametersExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure HTTP basic authorization: http_basic_test
|
||||
Configuration.Default.Username = "YOUR_USERNAME";
|
||||
Configuration.Default.Password = "YOUR_PASSWORD";
|
||||
|
||||
var apiInstance = new FakeApi();
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var number = 8.14; // decimal | None
|
||||
var _double = 1.2D; // double | None
|
||||
var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None
|
||||
@ -545,9 +610,11 @@ namespace Example
|
||||
// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -586,6 +653,12 @@ void (empty response body)
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Invalid username supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="testenumparameters"></a>
|
||||
@ -598,7 +671,7 @@ To test enum parameters
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -608,9 +681,10 @@ namespace Example
|
||||
{
|
||||
public class TestEnumParametersExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var enumHeaderStringArray = enumHeaderStringArray_example; // List<string> | Header parameter enum test (string array) (optional)
|
||||
var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||
var enumQueryStringArray = enumQueryStringArray_example; // List<string> | Query parameter enum test (string array) (optional)
|
||||
@ -625,9 +699,11 @@ namespace Example
|
||||
// To test enum parameters
|
||||
apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestEnumParameters: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -660,6 +736,12 @@ No authorization required
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Invalid request | - |
|
||||
| **404** | Not found | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="testgroupparameters"></a>
|
||||
@ -672,7 +754,7 @@ Fake endpoint to test group parameters (optional)
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -682,9 +764,10 @@ namespace Example
|
||||
{
|
||||
public class TestGroupParametersExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var requiredStringGroup = 56; // int | Required String in group parameters
|
||||
var requiredBooleanGroup = true; // bool | Required Boolean in group parameters
|
||||
var requiredInt64Group = 789; // long | Required Integer in group parameters
|
||||
@ -697,9 +780,11 @@ namespace Example
|
||||
// Fake endpoint to test group parameters (optional)
|
||||
apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestGroupParameters: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -730,6 +815,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Someting wrong | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="testinlineadditionalproperties"></a>
|
||||
@ -740,7 +830,7 @@ test inline additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -750,9 +840,10 @@ namespace Example
|
||||
{
|
||||
public class TestInlineAdditionalPropertiesExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var param = new Dictionary<string, string>(); // Dictionary<string, string> | request body
|
||||
|
||||
try
|
||||
@ -760,9 +851,11 @@ namespace Example
|
||||
// test inline additionalProperties
|
||||
apiInstance.TestInlineAdditionalProperties(param);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineAdditionalProperties: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -788,6 +881,11 @@ No authorization required
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="testjsonformdata"></a>
|
||||
@ -798,7 +896,7 @@ test json serialization of form data
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -808,9 +906,10 @@ namespace Example
|
||||
{
|
||||
public class TestJsonFormDataExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var param = param_example; // string | field1
|
||||
var param2 = param2_example; // string | field2
|
||||
|
||||
@ -819,9 +918,11 @@ namespace Example
|
||||
// test json serialization of form data
|
||||
apiInstance.TestJsonFormData(param, param2);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestJsonFormData: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -848,5 +949,10 @@ No authorization required
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
|
@ -17,7 +17,7 @@ To test class name in snake case
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -27,14 +27,15 @@ namespace Example
|
||||
{
|
||||
public class TestClassnameExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure API key authorization: api_key_query
|
||||
Configuration.Default.AddApiKey("api_key_query", "YOUR_API_KEY");
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// Configuration.Default.AddApiKeyPrefix("api_key_query", "Bearer");
|
||||
|
||||
var apiInstance = new FakeClassnameTags123Api();
|
||||
var apiInstance = new FakeClassnameTags123Api(Configuration.Default);
|
||||
var body = new ModelClient(); // ModelClient | client model
|
||||
|
||||
try
|
||||
@ -43,9 +44,11 @@ namespace Example
|
||||
ModelClient result = apiInstance.TestClassname(body);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeClassnameTags123Api.TestClassname: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -71,5 +74,10 @@ Name | Type | Description | Notes
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
|
@ -23,7 +23,7 @@ Add a new pet to the store
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -33,12 +33,13 @@ namespace Example
|
||||
{
|
||||
public class AddPetExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var body = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
|
||||
try
|
||||
@ -46,9 +47,11 @@ namespace Example
|
||||
// Add a new pet to the store
|
||||
apiInstance.AddPet(body);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling PetApi.AddPet: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -74,6 +77,12 @@ void (empty response body)
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **405** | Invalid input | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="deletepet"></a>
|
||||
@ -84,7 +93,7 @@ Deletes a pet
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -94,12 +103,13 @@ namespace Example
|
||||
{
|
||||
public class DeletePetExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var petId = 789; // long | Pet id to delete
|
||||
var apiKey = apiKey_example; // string | (optional)
|
||||
|
||||
@ -108,9 +118,11 @@ namespace Example
|
||||
// Deletes a pet
|
||||
apiInstance.DeletePet(petId, apiKey);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling PetApi.DeletePet: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -137,11 +149,17 @@ void (empty response body)
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid pet value | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="findpetsbystatus"></a>
|
||||
# **FindPetsByStatus**
|
||||
> List<Pet> FindPetsByStatus (List<string> status)
|
||||
> List<Pet> FindPetsByStatus (List<string> status)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
@ -149,7 +167,7 @@ Multiple status values can be provided with comma separated strings
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -159,23 +177,26 @@ namespace Example
|
||||
{
|
||||
public class FindPetsByStatusExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var status = status_example; // List<string> | Status values that need to be considered for filter
|
||||
|
||||
try
|
||||
{
|
||||
// Finds Pets by status
|
||||
List<Pet> result = apiInstance.FindPetsByStatus(status);
|
||||
List<Pet> result = apiInstance.FindPetsByStatus(status);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling PetApi.FindPetsByStatus: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -190,7 +211,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@ -201,11 +222,17 @@ Name | Type | Description | Notes
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid status value | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="findpetsbytags"></a>
|
||||
# **FindPetsByTags**
|
||||
> List<Pet> FindPetsByTags (List<string> tags)
|
||||
> List<Pet> FindPetsByTags (List<string> tags)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
@ -213,7 +240,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -223,23 +250,26 @@ namespace Example
|
||||
{
|
||||
public class FindPetsByTagsExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var tags = new List<string>(); // List<string> | Tags to filter by
|
||||
|
||||
try
|
||||
{
|
||||
// Finds Pets by tags
|
||||
List<Pet> result = apiInstance.FindPetsByTags(tags);
|
||||
List<Pet> result = apiInstance.FindPetsByTags(tags);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling PetApi.FindPetsByTags: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -254,7 +284,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@ -265,6 +295,12 @@ Name | Type | Description | Notes
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid tag value | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="getpetbyid"></a>
|
||||
@ -277,7 +313,7 @@ Returns a single pet
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -287,14 +323,15 @@ namespace Example
|
||||
{
|
||||
public class GetPetByIdExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure API key authorization: api_key
|
||||
Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var petId = 789; // long | ID of pet to return
|
||||
|
||||
try
|
||||
@ -303,9 +340,11 @@ namespace Example
|
||||
Pet result = apiInstance.GetPetById(petId);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling PetApi.GetPetById: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -331,6 +370,13 @@ Name | Type | Description | Notes
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid ID supplied | - |
|
||||
| **404** | Pet not found | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="updatepet"></a>
|
||||
@ -341,7 +387,7 @@ Update an existing pet
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -351,12 +397,13 @@ namespace Example
|
||||
{
|
||||
public class UpdatePetExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var body = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
|
||||
try
|
||||
@ -364,9 +411,11 @@ namespace Example
|
||||
// Update an existing pet
|
||||
apiInstance.UpdatePet(body);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling PetApi.UpdatePet: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -392,6 +441,14 @@ void (empty response body)
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid ID supplied | - |
|
||||
| **404** | Pet not found | - |
|
||||
| **405** | Validation exception | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="updatepetwithform"></a>
|
||||
@ -402,7 +459,7 @@ Updates a pet in the store with form data
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -412,12 +469,13 @@ namespace Example
|
||||
{
|
||||
public class UpdatePetWithFormExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var petId = 789; // long | ID of pet that needs to be updated
|
||||
var name = name_example; // string | Updated name of the pet (optional)
|
||||
var status = status_example; // string | Updated status of the pet (optional)
|
||||
@ -427,9 +485,11 @@ namespace Example
|
||||
// Updates a pet in the store with form data
|
||||
apiInstance.UpdatePetWithForm(petId, name, status);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling PetApi.UpdatePetWithForm: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -457,6 +517,11 @@ void (empty response body)
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **405** | Invalid input | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="uploadfile"></a>
|
||||
@ -467,7 +532,7 @@ uploads an image
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -477,12 +542,13 @@ namespace Example
|
||||
{
|
||||
public class UploadFileExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var petId = 789; // long | ID of pet to update
|
||||
var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional)
|
||||
var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional)
|
||||
@ -493,9 +559,11 @@ namespace Example
|
||||
ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -523,6 +591,11 @@ Name | Type | Description | Notes
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="uploadfilewithrequiredfile"></a>
|
||||
@ -533,7 +606,7 @@ uploads an image (required)
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -543,12 +616,13 @@ namespace Example
|
||||
{
|
||||
public class UploadFileWithRequiredFileExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var petId = 789; // long | ID of pet to update
|
||||
var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload
|
||||
var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional)
|
||||
@ -559,9 +633,11 @@ namespace Example
|
||||
ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -589,5 +665,10 @@ Name | Type | Description | Notes
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
|
@ -20,7 +20,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -30,9 +30,10 @@ namespace Example
|
||||
{
|
||||
public class DeleteOrderExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new StoreApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new StoreApi(Configuration.Default);
|
||||
var orderId = orderId_example; // string | ID of the order that needs to be deleted
|
||||
|
||||
try
|
||||
@ -40,9 +41,11 @@ namespace Example
|
||||
// Delete purchase order by ID
|
||||
apiInstance.DeleteOrder(orderId);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling StoreApi.DeleteOrder: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -68,11 +71,17 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Invalid ID supplied | - |
|
||||
| **404** | Order not found | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="getinventory"></a>
|
||||
# **GetInventory**
|
||||
> Dictionary<string, int> GetInventory ()
|
||||
> Dictionary<string, int> GetInventory ()
|
||||
|
||||
Returns pet inventories by status
|
||||
|
||||
@ -80,7 +89,7 @@ Returns a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -90,24 +99,27 @@ namespace Example
|
||||
{
|
||||
public class GetInventoryExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure API key authorization: api_key
|
||||
Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");
|
||||
|
||||
var apiInstance = new StoreApi();
|
||||
var apiInstance = new StoreApi(Configuration.Default);
|
||||
|
||||
try
|
||||
{
|
||||
// Returns pet inventories by status
|
||||
Dictionary<string, int> result = apiInstance.GetInventory();
|
||||
Dictionary<string, int> result = apiInstance.GetInventory();
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling StoreApi.GetInventory: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -130,6 +142,11 @@ This endpoint does not need any parameter.
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="getorderbyid"></a>
|
||||
@ -142,7 +159,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -152,9 +169,10 @@ namespace Example
|
||||
{
|
||||
public class GetOrderByIdExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new StoreApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new StoreApi(Configuration.Default);
|
||||
var orderId = 789; // long | ID of pet that needs to be fetched
|
||||
|
||||
try
|
||||
@ -163,9 +181,11 @@ namespace Example
|
||||
Order result = apiInstance.GetOrderById(orderId);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling StoreApi.GetOrderById: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -191,6 +211,13 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid ID supplied | - |
|
||||
| **404** | Order not found | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="placeorder"></a>
|
||||
@ -201,7 +228,7 @@ Place an order for a pet
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -211,9 +238,10 @@ namespace Example
|
||||
{
|
||||
public class PlaceOrderExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new StoreApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new StoreApi(Configuration.Default);
|
||||
var body = new Order(); // Order | order placed for purchasing the pet
|
||||
|
||||
try
|
||||
@ -222,9 +250,11 @@ namespace Example
|
||||
Order result = apiInstance.PlaceOrder(body);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling StoreApi.PlaceOrder: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -250,5 +280,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid Order | - |
|
||||
|
||||
[[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)
|
||||
|
||||
|
@ -24,7 +24,7 @@ This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -34,9 +34,10 @@ namespace Example
|
||||
{
|
||||
public class CreateUserExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new UserApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new UserApi(Configuration.Default);
|
||||
var body = new User(); // User | Created user object
|
||||
|
||||
try
|
||||
@ -44,9 +45,11 @@ namespace Example
|
||||
// Create user
|
||||
apiInstance.CreateUser(body);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling UserApi.CreateUser: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -72,6 +75,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="createuserswitharrayinput"></a>
|
||||
@ -82,7 +90,7 @@ Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -92,9 +100,10 @@ namespace Example
|
||||
{
|
||||
public class CreateUsersWithArrayInputExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new UserApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new UserApi(Configuration.Default);
|
||||
var body = new List<User>(); // List<User> | List of user object
|
||||
|
||||
try
|
||||
@ -102,9 +111,11 @@ namespace Example
|
||||
// Creates list of users with given input array
|
||||
apiInstance.CreateUsersWithArrayInput(body);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling UserApi.CreateUsersWithArrayInput: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -130,6 +141,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="createuserswithlistinput"></a>
|
||||
@ -140,7 +156,7 @@ Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -150,9 +166,10 @@ namespace Example
|
||||
{
|
||||
public class CreateUsersWithListInputExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new UserApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new UserApi(Configuration.Default);
|
||||
var body = new List<User>(); // List<User> | List of user object
|
||||
|
||||
try
|
||||
@ -160,9 +177,11 @@ namespace Example
|
||||
// Creates list of users with given input array
|
||||
apiInstance.CreateUsersWithListInput(body);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling UserApi.CreateUsersWithListInput: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -188,6 +207,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="deleteuser"></a>
|
||||
@ -200,7 +224,7 @@ This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -210,9 +234,10 @@ namespace Example
|
||||
{
|
||||
public class DeleteUserExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new UserApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new UserApi(Configuration.Default);
|
||||
var username = username_example; // string | The name that needs to be deleted
|
||||
|
||||
try
|
||||
@ -220,9 +245,11 @@ namespace Example
|
||||
// Delete user
|
||||
apiInstance.DeleteUser(username);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling UserApi.DeleteUser: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -248,6 +275,12 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Invalid username supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="getuserbyname"></a>
|
||||
@ -258,7 +291,7 @@ Get user by user name
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -268,9 +301,10 @@ namespace Example
|
||||
{
|
||||
public class GetUserByNameExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new UserApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new UserApi(Configuration.Default);
|
||||
var username = username_example; // string | The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
try
|
||||
@ -279,9 +313,11 @@ namespace Example
|
||||
User result = apiInstance.GetUserByName(username);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling UserApi.GetUserByName: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -307,6 +343,13 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid username supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="loginuser"></a>
|
||||
@ -317,7 +360,7 @@ Logs user into the system
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -327,9 +370,10 @@ namespace Example
|
||||
{
|
||||
public class LoginUserExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new UserApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new UserApi(Configuration.Default);
|
||||
var username = username_example; // string | The user name for login
|
||||
var password = password_example; // string | The password for login in clear text
|
||||
|
||||
@ -339,9 +383,11 @@ namespace Example
|
||||
string result = apiInstance.LoginUser(username, password);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling UserApi.LoginUser: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -368,6 +414,12 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user <br> * X-Expires-After - date in UTC when token expires <br> |
|
||||
| **400** | Invalid username/password supplied | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="logoutuser"></a>
|
||||
@ -378,7 +430,7 @@ Logs out current logged in user session
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -388,18 +440,21 @@ namespace Example
|
||||
{
|
||||
public class LogoutUserExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new UserApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new UserApi(Configuration.Default);
|
||||
|
||||
try
|
||||
{
|
||||
// Logs out current logged in user session
|
||||
apiInstance.LogoutUser();
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling UserApi.LogoutUser: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -422,6 +477,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="updateuser"></a>
|
||||
@ -434,7 +494,7 @@ This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -444,9 +504,10 @@ namespace Example
|
||||
{
|
||||
public class UpdateUserExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new UserApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new UserApi(Configuration.Default);
|
||||
var username = username_example; // string | name that need to be deleted
|
||||
var body = new User(); // User | Updated user object
|
||||
|
||||
@ -455,9 +516,11 @@ namespace Example
|
||||
// Updated user
|
||||
apiInstance.UpdateUser(username, body);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling UserApi.UpdateUser: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -484,5 +547,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Invalid user supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
||||
[[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)
|
||||
|
||||
|
@ -60,7 +60,7 @@ Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-p
|
||||
## Getting Started
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -70,10 +70,11 @@ namespace Example
|
||||
{
|
||||
public class Example
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
|
||||
var apiInstance = new AnotherFakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new AnotherFakeApi(Configuration.Default);
|
||||
var body = new ModelClient(); // ModelClient | client model
|
||||
|
||||
try
|
||||
@ -82,9 +83,11 @@ namespace Example
|
||||
ModelClient result = apiInstance.Call123TestSpecialTags(body);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ To test special tags and operation ID starting with number
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -27,9 +27,10 @@ namespace Example
|
||||
{
|
||||
public class Call123TestSpecialTagsExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new AnotherFakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new AnotherFakeApi(Configuration.Default);
|
||||
var body = new ModelClient(); // ModelClient | client model
|
||||
|
||||
try
|
||||
@ -38,9 +39,11 @@ namespace Example
|
||||
ModelClient result = apiInstance.Call123TestSpecialTags(body);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -66,5 +69,10 @@ No authorization required
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
|
@ -29,7 +29,7 @@ this route creates an XmlItem
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -39,9 +39,10 @@ namespace Example
|
||||
{
|
||||
public class CreateXmlItemExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var xmlItem = new XmlItem(); // XmlItem | XmlItem Body
|
||||
|
||||
try
|
||||
@ -49,9 +50,11 @@ namespace Example
|
||||
// creates an XmlItem
|
||||
apiInstance.CreateXmlItem(xmlItem);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.CreateXmlItem: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -77,6 +80,11 @@ No authorization required
|
||||
- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="fakeouterbooleanserialize"></a>
|
||||
@ -89,7 +97,7 @@ Test serialization of outer boolean types
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -99,9 +107,10 @@ namespace Example
|
||||
{
|
||||
public class FakeOuterBooleanSerializeExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var body = true; // bool? | Input boolean as post body (optional)
|
||||
|
||||
try
|
||||
@ -109,9 +118,11 @@ namespace Example
|
||||
bool result = apiInstance.FakeOuterBooleanSerialize(body);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -137,6 +148,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Output boolean | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="fakeoutercompositeserialize"></a>
|
||||
@ -149,7 +165,7 @@ Test serialization of object with outer number type
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -159,9 +175,10 @@ namespace Example
|
||||
{
|
||||
public class FakeOuterCompositeSerializeExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional)
|
||||
|
||||
try
|
||||
@ -169,9 +186,11 @@ namespace Example
|
||||
OuterComposite result = apiInstance.FakeOuterCompositeSerialize(body);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.FakeOuterCompositeSerialize: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -197,6 +216,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Output composite | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="fakeouternumberserialize"></a>
|
||||
@ -209,7 +233,7 @@ Test serialization of outer number types
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -219,9 +243,10 @@ namespace Example
|
||||
{
|
||||
public class FakeOuterNumberSerializeExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var body = 8.14; // decimal? | Input number as post body (optional)
|
||||
|
||||
try
|
||||
@ -229,9 +254,11 @@ namespace Example
|
||||
decimal result = apiInstance.FakeOuterNumberSerialize(body);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.FakeOuterNumberSerialize: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -257,6 +284,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Output number | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="fakeouterstringserialize"></a>
|
||||
@ -269,7 +301,7 @@ Test serialization of outer string types
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -279,9 +311,10 @@ namespace Example
|
||||
{
|
||||
public class FakeOuterStringSerializeExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var body = body_example; // string | Input string as post body (optional)
|
||||
|
||||
try
|
||||
@ -289,9 +322,11 @@ namespace Example
|
||||
string result = apiInstance.FakeOuterStringSerialize(body);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.FakeOuterStringSerialize: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -317,6 +352,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Output string | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="testbodywithfileschema"></a>
|
||||
@ -329,7 +369,7 @@ For this test, the body for this request much reference a schema named `File`.
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -339,18 +379,21 @@ namespace Example
|
||||
{
|
||||
public class TestBodyWithFileSchemaExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var body = new FileSchemaTestClass(); // FileSchemaTestClass |
|
||||
|
||||
try
|
||||
{
|
||||
apiInstance.TestBodyWithFileSchema(body);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestBodyWithFileSchema: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -376,6 +419,11 @@ No authorization required
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Success | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="testbodywithqueryparams"></a>
|
||||
@ -386,7 +434,7 @@ No authorization required
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -396,9 +444,10 @@ namespace Example
|
||||
{
|
||||
public class TestBodyWithQueryParamsExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var query = query_example; // string |
|
||||
var body = new User(); // User |
|
||||
|
||||
@ -406,9 +455,11 @@ namespace Example
|
||||
{
|
||||
apiInstance.TestBodyWithQueryParams(query, body);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestBodyWithQueryParams: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -435,6 +486,11 @@ No authorization required
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Success | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="testclientmodel"></a>
|
||||
@ -447,7 +503,7 @@ To test \"client\" model
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -457,9 +513,10 @@ namespace Example
|
||||
{
|
||||
public class TestClientModelExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var body = new ModelClient(); // ModelClient | client model
|
||||
|
||||
try
|
||||
@ -468,9 +525,11 @@ namespace Example
|
||||
ModelClient result = apiInstance.TestClientModel(body);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -496,6 +555,11 @@ No authorization required
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="testendpointparameters"></a>
|
||||
@ -508,7 +572,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -518,13 +582,14 @@ namespace Example
|
||||
{
|
||||
public class TestEndpointParametersExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure HTTP basic authorization: http_basic_test
|
||||
Configuration.Default.Username = "YOUR_USERNAME";
|
||||
Configuration.Default.Password = "YOUR_PASSWORD";
|
||||
|
||||
var apiInstance = new FakeApi();
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var number = 8.14; // decimal | None
|
||||
var _double = 1.2D; // double | None
|
||||
var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None
|
||||
@ -545,9 +610,11 @@ namespace Example
|
||||
// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -586,6 +653,12 @@ void (empty response body)
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Invalid username supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="testenumparameters"></a>
|
||||
@ -598,7 +671,7 @@ To test enum parameters
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -608,9 +681,10 @@ namespace Example
|
||||
{
|
||||
public class TestEnumParametersExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var enumHeaderStringArray = enumHeaderStringArray_example; // List<string> | Header parameter enum test (string array) (optional)
|
||||
var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||
var enumQueryStringArray = enumQueryStringArray_example; // List<string> | Query parameter enum test (string array) (optional)
|
||||
@ -625,9 +699,11 @@ namespace Example
|
||||
// To test enum parameters
|
||||
apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestEnumParameters: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -660,6 +736,12 @@ No authorization required
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Invalid request | - |
|
||||
| **404** | Not found | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="testgroupparameters"></a>
|
||||
@ -672,7 +754,7 @@ Fake endpoint to test group parameters (optional)
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -682,9 +764,10 @@ namespace Example
|
||||
{
|
||||
public class TestGroupParametersExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var requiredStringGroup = 56; // int | Required String in group parameters
|
||||
var requiredBooleanGroup = true; // bool | Required Boolean in group parameters
|
||||
var requiredInt64Group = 789; // long | Required Integer in group parameters
|
||||
@ -697,9 +780,11 @@ namespace Example
|
||||
// Fake endpoint to test group parameters (optional)
|
||||
apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestGroupParameters: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -730,6 +815,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Someting wrong | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="testinlineadditionalproperties"></a>
|
||||
@ -740,7 +830,7 @@ test inline additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -750,9 +840,10 @@ namespace Example
|
||||
{
|
||||
public class TestInlineAdditionalPropertiesExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var param = new Dictionary<string, string>(); // Dictionary<string, string> | request body
|
||||
|
||||
try
|
||||
@ -760,9 +851,11 @@ namespace Example
|
||||
// test inline additionalProperties
|
||||
apiInstance.TestInlineAdditionalProperties(param);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineAdditionalProperties: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -788,6 +881,11 @@ No authorization required
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="testjsonformdata"></a>
|
||||
@ -798,7 +896,7 @@ test json serialization of form data
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -808,9 +906,10 @@ namespace Example
|
||||
{
|
||||
public class TestJsonFormDataExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var param = param_example; // string | field1
|
||||
var param2 = param2_example; // string | field2
|
||||
|
||||
@ -819,9 +918,11 @@ namespace Example
|
||||
// test json serialization of form data
|
||||
apiInstance.TestJsonFormData(param, param2);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestJsonFormData: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -848,5 +949,10 @@ No authorization required
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
|
@ -17,7 +17,7 @@ To test class name in snake case
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -27,14 +27,15 @@ namespace Example
|
||||
{
|
||||
public class TestClassnameExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure API key authorization: api_key_query
|
||||
Configuration.Default.AddApiKey("api_key_query", "YOUR_API_KEY");
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// Configuration.Default.AddApiKeyPrefix("api_key_query", "Bearer");
|
||||
|
||||
var apiInstance = new FakeClassnameTags123Api();
|
||||
var apiInstance = new FakeClassnameTags123Api(Configuration.Default);
|
||||
var body = new ModelClient(); // ModelClient | client model
|
||||
|
||||
try
|
||||
@ -43,9 +44,11 @@ namespace Example
|
||||
ModelClient result = apiInstance.TestClassname(body);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeClassnameTags123Api.TestClassname: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -71,5 +74,10 @@ Name | Type | Description | Notes
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
|
@ -23,7 +23,7 @@ Add a new pet to the store
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -33,12 +33,13 @@ namespace Example
|
||||
{
|
||||
public class AddPetExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var body = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
|
||||
try
|
||||
@ -46,9 +47,11 @@ namespace Example
|
||||
// Add a new pet to the store
|
||||
apiInstance.AddPet(body);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling PetApi.AddPet: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -74,6 +77,12 @@ void (empty response body)
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **405** | Invalid input | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="deletepet"></a>
|
||||
@ -84,7 +93,7 @@ Deletes a pet
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -94,12 +103,13 @@ namespace Example
|
||||
{
|
||||
public class DeletePetExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var petId = 789; // long | Pet id to delete
|
||||
var apiKey = apiKey_example; // string | (optional)
|
||||
|
||||
@ -108,9 +118,11 @@ namespace Example
|
||||
// Deletes a pet
|
||||
apiInstance.DeletePet(petId, apiKey);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling PetApi.DeletePet: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -137,11 +149,17 @@ void (empty response body)
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid pet value | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="findpetsbystatus"></a>
|
||||
# **FindPetsByStatus**
|
||||
> List<Pet> FindPetsByStatus (List<string> status)
|
||||
> List<Pet> FindPetsByStatus (List<string> status)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
@ -149,7 +167,7 @@ Multiple status values can be provided with comma separated strings
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -159,23 +177,26 @@ namespace Example
|
||||
{
|
||||
public class FindPetsByStatusExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var status = status_example; // List<string> | Status values that need to be considered for filter
|
||||
|
||||
try
|
||||
{
|
||||
// Finds Pets by status
|
||||
List<Pet> result = apiInstance.FindPetsByStatus(status);
|
||||
List<Pet> result = apiInstance.FindPetsByStatus(status);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling PetApi.FindPetsByStatus: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -190,7 +211,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@ -201,11 +222,17 @@ Name | Type | Description | Notes
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid status value | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="findpetsbytags"></a>
|
||||
# **FindPetsByTags**
|
||||
> List<Pet> FindPetsByTags (List<string> tags)
|
||||
> List<Pet> FindPetsByTags (List<string> tags)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
@ -213,7 +240,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -223,23 +250,26 @@ namespace Example
|
||||
{
|
||||
public class FindPetsByTagsExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var tags = new List<string>(); // List<string> | Tags to filter by
|
||||
|
||||
try
|
||||
{
|
||||
// Finds Pets by tags
|
||||
List<Pet> result = apiInstance.FindPetsByTags(tags);
|
||||
List<Pet> result = apiInstance.FindPetsByTags(tags);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling PetApi.FindPetsByTags: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -254,7 +284,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@ -265,6 +295,12 @@ Name | Type | Description | Notes
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid tag value | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="getpetbyid"></a>
|
||||
@ -277,7 +313,7 @@ Returns a single pet
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -287,14 +323,15 @@ namespace Example
|
||||
{
|
||||
public class GetPetByIdExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure API key authorization: api_key
|
||||
Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var petId = 789; // long | ID of pet to return
|
||||
|
||||
try
|
||||
@ -303,9 +340,11 @@ namespace Example
|
||||
Pet result = apiInstance.GetPetById(petId);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling PetApi.GetPetById: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -331,6 +370,13 @@ Name | Type | Description | Notes
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid ID supplied | - |
|
||||
| **404** | Pet not found | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="updatepet"></a>
|
||||
@ -341,7 +387,7 @@ Update an existing pet
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -351,12 +397,13 @@ namespace Example
|
||||
{
|
||||
public class UpdatePetExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var body = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
|
||||
try
|
||||
@ -364,9 +411,11 @@ namespace Example
|
||||
// Update an existing pet
|
||||
apiInstance.UpdatePet(body);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling PetApi.UpdatePet: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -392,6 +441,14 @@ void (empty response body)
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid ID supplied | - |
|
||||
| **404** | Pet not found | - |
|
||||
| **405** | Validation exception | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="updatepetwithform"></a>
|
||||
@ -402,7 +459,7 @@ Updates a pet in the store with form data
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -412,12 +469,13 @@ namespace Example
|
||||
{
|
||||
public class UpdatePetWithFormExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var petId = 789; // long | ID of pet that needs to be updated
|
||||
var name = name_example; // string | Updated name of the pet (optional)
|
||||
var status = status_example; // string | Updated status of the pet (optional)
|
||||
@ -427,9 +485,11 @@ namespace Example
|
||||
// Updates a pet in the store with form data
|
||||
apiInstance.UpdatePetWithForm(petId, name, status);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling PetApi.UpdatePetWithForm: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -457,6 +517,11 @@ void (empty response body)
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **405** | Invalid input | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="uploadfile"></a>
|
||||
@ -467,7 +532,7 @@ uploads an image
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -477,12 +542,13 @@ namespace Example
|
||||
{
|
||||
public class UploadFileExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var petId = 789; // long | ID of pet to update
|
||||
var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional)
|
||||
var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional)
|
||||
@ -493,9 +559,11 @@ namespace Example
|
||||
ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -523,6 +591,11 @@ Name | Type | Description | Notes
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="uploadfilewithrequiredfile"></a>
|
||||
@ -533,7 +606,7 @@ uploads an image (required)
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -543,12 +616,13 @@ namespace Example
|
||||
{
|
||||
public class UploadFileWithRequiredFileExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
var apiInstance = new PetApi();
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var petId = 789; // long | ID of pet to update
|
||||
var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload
|
||||
var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional)
|
||||
@ -559,9 +633,11 @@ namespace Example
|
||||
ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -589,5 +665,10 @@ Name | Type | Description | Notes
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
|
@ -20,7 +20,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -30,9 +30,10 @@ namespace Example
|
||||
{
|
||||
public class DeleteOrderExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new StoreApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new StoreApi(Configuration.Default);
|
||||
var orderId = orderId_example; // string | ID of the order that needs to be deleted
|
||||
|
||||
try
|
||||
@ -40,9 +41,11 @@ namespace Example
|
||||
// Delete purchase order by ID
|
||||
apiInstance.DeleteOrder(orderId);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling StoreApi.DeleteOrder: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -68,11 +71,17 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Invalid ID supplied | - |
|
||||
| **404** | Order not found | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="getinventory"></a>
|
||||
# **GetInventory**
|
||||
> Dictionary<string, int> GetInventory ()
|
||||
> Dictionary<string, int> GetInventory ()
|
||||
|
||||
Returns pet inventories by status
|
||||
|
||||
@ -80,7 +89,7 @@ Returns a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -90,24 +99,27 @@ namespace Example
|
||||
{
|
||||
public class GetInventoryExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// Configure API key authorization: api_key
|
||||
Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");
|
||||
|
||||
var apiInstance = new StoreApi();
|
||||
var apiInstance = new StoreApi(Configuration.Default);
|
||||
|
||||
try
|
||||
{
|
||||
// Returns pet inventories by status
|
||||
Dictionary<string, int> result = apiInstance.GetInventory();
|
||||
Dictionary<string, int> result = apiInstance.GetInventory();
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling StoreApi.GetInventory: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -130,6 +142,11 @@ This endpoint does not need any parameter.
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="getorderbyid"></a>
|
||||
@ -142,7 +159,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -152,9 +169,10 @@ namespace Example
|
||||
{
|
||||
public class GetOrderByIdExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new StoreApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new StoreApi(Configuration.Default);
|
||||
var orderId = 789; // long | ID of pet that needs to be fetched
|
||||
|
||||
try
|
||||
@ -163,9 +181,11 @@ namespace Example
|
||||
Order result = apiInstance.GetOrderById(orderId);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling StoreApi.GetOrderById: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -191,6 +211,13 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid ID supplied | - |
|
||||
| **404** | Order not found | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="placeorder"></a>
|
||||
@ -201,7 +228,7 @@ Place an order for a pet
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -211,9 +238,10 @@ namespace Example
|
||||
{
|
||||
public class PlaceOrderExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new StoreApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new StoreApi(Configuration.Default);
|
||||
var body = new Order(); // Order | order placed for purchasing the pet
|
||||
|
||||
try
|
||||
@ -222,9 +250,11 @@ namespace Example
|
||||
Order result = apiInstance.PlaceOrder(body);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling StoreApi.PlaceOrder: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -250,5 +280,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid Order | - |
|
||||
|
||||
[[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)
|
||||
|
||||
|
@ -24,7 +24,7 @@ This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -34,9 +34,10 @@ namespace Example
|
||||
{
|
||||
public class CreateUserExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new UserApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new UserApi(Configuration.Default);
|
||||
var body = new User(); // User | Created user object
|
||||
|
||||
try
|
||||
@ -44,9 +45,11 @@ namespace Example
|
||||
// Create user
|
||||
apiInstance.CreateUser(body);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling UserApi.CreateUser: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -72,6 +75,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="createuserswitharrayinput"></a>
|
||||
@ -82,7 +90,7 @@ Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -92,9 +100,10 @@ namespace Example
|
||||
{
|
||||
public class CreateUsersWithArrayInputExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new UserApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new UserApi(Configuration.Default);
|
||||
var body = new List<User>(); // List<User> | List of user object
|
||||
|
||||
try
|
||||
@ -102,9 +111,11 @@ namespace Example
|
||||
// Creates list of users with given input array
|
||||
apiInstance.CreateUsersWithArrayInput(body);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling UserApi.CreateUsersWithArrayInput: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -130,6 +141,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="createuserswithlistinput"></a>
|
||||
@ -140,7 +156,7 @@ Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -150,9 +166,10 @@ namespace Example
|
||||
{
|
||||
public class CreateUsersWithListInputExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new UserApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new UserApi(Configuration.Default);
|
||||
var body = new List<User>(); // List<User> | List of user object
|
||||
|
||||
try
|
||||
@ -160,9 +177,11 @@ namespace Example
|
||||
// Creates list of users with given input array
|
||||
apiInstance.CreateUsersWithListInput(body);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling UserApi.CreateUsersWithListInput: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -188,6 +207,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="deleteuser"></a>
|
||||
@ -200,7 +224,7 @@ This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -210,9 +234,10 @@ namespace Example
|
||||
{
|
||||
public class DeleteUserExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new UserApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new UserApi(Configuration.Default);
|
||||
var username = username_example; // string | The name that needs to be deleted
|
||||
|
||||
try
|
||||
@ -220,9 +245,11 @@ namespace Example
|
||||
// Delete user
|
||||
apiInstance.DeleteUser(username);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling UserApi.DeleteUser: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -248,6 +275,12 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Invalid username supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="getuserbyname"></a>
|
||||
@ -258,7 +291,7 @@ Get user by user name
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -268,9 +301,10 @@ namespace Example
|
||||
{
|
||||
public class GetUserByNameExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new UserApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new UserApi(Configuration.Default);
|
||||
var username = username_example; // string | The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
try
|
||||
@ -279,9 +313,11 @@ namespace Example
|
||||
User result = apiInstance.GetUserByName(username);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling UserApi.GetUserByName: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -307,6 +343,13 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid username supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="loginuser"></a>
|
||||
@ -317,7 +360,7 @@ Logs user into the system
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -327,9 +370,10 @@ namespace Example
|
||||
{
|
||||
public class LoginUserExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new UserApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new UserApi(Configuration.Default);
|
||||
var username = username_example; // string | The user name for login
|
||||
var password = password_example; // string | The password for login in clear text
|
||||
|
||||
@ -339,9 +383,11 @@ namespace Example
|
||||
string result = apiInstance.LoginUser(username, password);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling UserApi.LoginUser: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -368,6 +414,12 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user <br> * X-Expires-After - date in UTC when token expires <br> |
|
||||
| **400** | Invalid username/password supplied | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="logoutuser"></a>
|
||||
@ -378,7 +430,7 @@ Logs out current logged in user session
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -388,18 +440,21 @@ namespace Example
|
||||
{
|
||||
public class LogoutUserExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new UserApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new UserApi(Configuration.Default);
|
||||
|
||||
try
|
||||
{
|
||||
// Logs out current logged in user session
|
||||
apiInstance.LogoutUser();
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling UserApi.LogoutUser: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -422,6 +477,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
<a name="updateuser"></a>
|
||||
@ -434,7 +494,7 @@ This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@ -444,9 +504,10 @@ namespace Example
|
||||
{
|
||||
public class UpdateUserExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new UserApi();
|
||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new UserApi(Configuration.Default);
|
||||
var username = username_example; // string | name that need to be deleted
|
||||
var body = new User(); // User | Updated user object
|
||||
|
||||
@ -455,9 +516,11 @@ namespace Example
|
||||
// Updated user
|
||||
apiInstance.UpdateUser(username, body);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling UserApi.UpdateUser: " + e.Message );
|
||||
Debug.Print("Status Code: "+ e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -484,5 +547,11 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Invalid user supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
||||
[[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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user