mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-18 22:57:07 +00:00
Fix logic of getNullableType of csharp server and client. (#3537)
* Fix default nullable * Fix tests * Update samples * Fix template default value * Update samples * Also fix for interface * update samples
This commit is contained in:
committed by
William Cheng
parent
2bbebf9752
commit
5ab1c9c75b
@@ -6,10 +6,10 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**MapString** | **Dictionary<string, string>** | | [optional]
|
||||
**MapNumber** | **Dictionary<string, decimal?>** | | [optional]
|
||||
**MapInteger** | **Dictionary<string, int?>** | | [optional]
|
||||
**MapBoolean** | **Dictionary<string, bool?>** | | [optional]
|
||||
**MapArrayInteger** | **Dictionary<string, List<int?>>** | | [optional]
|
||||
**MapNumber** | **Dictionary<string, decimal>** | | [optional]
|
||||
**MapInteger** | **Dictionary<string, int>** | | [optional]
|
||||
**MapBoolean** | **Dictionary<string, bool>** | | [optional]
|
||||
**MapArrayInteger** | **Dictionary<string, List<int>>** | | [optional]
|
||||
**MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional]
|
||||
**MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional]
|
||||
**MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional]
|
||||
|
||||
@@ -19,7 +19,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;
|
||||
@@ -29,9 +29,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
|
||||
@@ -40,9 +41,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,6 +72,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)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Code** | **int?** | | [optional]
|
||||
**Code** | **int** | | [optional]
|
||||
**Type** | **string** | | [optional]
|
||||
**Message** | **string** | | [optional]
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ArrayArrayNumber** | **List<List<decimal?>>** | | [optional]
|
||||
**ArrayArrayNumber** | **List<List<decimal>>** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ArrayNumber** | **List<decimal?>** | | [optional]
|
||||
**ArrayNumber** | **List<decimal>** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ArrayOfString** | **List<string>** | | [optional]
|
||||
**ArrayArrayOfInteger** | **List<List<long?>>** | | [optional]
|
||||
**ArrayArrayOfInteger** | **List<List<long>>** | | [optional]
|
||||
**ArrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
|
||||
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ClassName** | **string** | |
|
||||
**Color** | **string** | | [optional] [default to "red"]
|
||||
**Declawed** | **bool?** | | [optional]
|
||||
**Declawed** | **bool** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Declawed** | **bool?** | | [optional]
|
||||
**Declawed** | **bool** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**Id** | **long** | | [optional]
|
||||
**Name** | **string** | | [default to "default-name"]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
|
||||
@@ -7,8 +7,8 @@ Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**EnumString** | **string** | | [optional]
|
||||
**EnumStringRequired** | **string** | |
|
||||
**EnumInteger** | **int?** | | [optional]
|
||||
**EnumNumber** | **double?** | | [optional]
|
||||
**EnumInteger** | **int** | | [optional]
|
||||
**EnumNumber** | **double** | | [optional]
|
||||
**OuterEnum** | **OuterEnum** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
|
||||
@@ -31,7 +31,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;
|
||||
@@ -41,9 +41,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
|
||||
@@ -51,9 +52,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,6 +83,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)
|
||||
@@ -88,7 +96,7 @@ No authorization required
|
||||
|
||||
## FakeOuterBooleanSerialize
|
||||
|
||||
> bool? FakeOuterBooleanSerialize (bool? body = null)
|
||||
> bool FakeOuterBooleanSerialize (bool body = null)
|
||||
|
||||
|
||||
|
||||
@@ -97,7 +105,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;
|
||||
@@ -107,19 +115,22 @@ namespace Example
|
||||
{
|
||||
public class FakeOuterBooleanSerializeExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
var body = true; // bool? | Input boolean as post body (optional)
|
||||
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
|
||||
{
|
||||
bool? result = apiInstance.FakeOuterBooleanSerialize(body);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -131,11 +142,11 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **bool?**| Input boolean as post body | [optional]
|
||||
**body** | **bool**| Input boolean as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
**bool?**
|
||||
**bool**
|
||||
|
||||
### Authorization
|
||||
|
||||
@@ -146,6 +157,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)
|
||||
@@ -163,7 +179,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;
|
||||
@@ -173,9 +189,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
|
||||
@@ -183,9 +200,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -212,6 +231,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)
|
||||
@@ -220,7 +244,7 @@ No authorization required
|
||||
|
||||
## FakeOuterNumberSerialize
|
||||
|
||||
> decimal? FakeOuterNumberSerialize (decimal? body = null)
|
||||
> decimal FakeOuterNumberSerialize (decimal body = null)
|
||||
|
||||
|
||||
|
||||
@@ -229,7 +253,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;
|
||||
@@ -239,19 +263,22 @@ namespace Example
|
||||
{
|
||||
public class FakeOuterNumberSerializeExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
var body = 8.14; // decimal? | Input number as post body (optional)
|
||||
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
|
||||
{
|
||||
decimal? result = apiInstance.FakeOuterNumberSerialize(body);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -263,11 +290,11 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **decimal?**| Input number as post body | [optional]
|
||||
**body** | **decimal**| Input number as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
**decimal?**
|
||||
**decimal**
|
||||
|
||||
### Authorization
|
||||
|
||||
@@ -278,6 +305,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)
|
||||
@@ -295,7 +327,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;
|
||||
@@ -305,9 +337,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
|
||||
@@ -315,9 +348,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -344,6 +379,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)
|
||||
@@ -361,7 +401,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;
|
||||
@@ -371,18 +411,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -409,6 +452,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)
|
||||
@@ -424,7 +472,7 @@ No authorization required
|
||||
### Example
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@@ -434,9 +482,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 |
|
||||
|
||||
@@ -444,9 +493,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -474,6 +525,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)
|
||||
@@ -491,7 +547,7 @@ To test \"client\" model
|
||||
### Example
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@@ -501,9 +557,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
|
||||
@@ -512,9 +569,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -541,6 +600,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)
|
||||
@@ -549,7 +613,7 @@ No authorization required
|
||||
|
||||
## TestEndpointParameters
|
||||
|
||||
> void TestEndpointParameters (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null)
|
||||
> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null)
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
|
||||
@@ -558,7 +622,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;
|
||||
@@ -568,25 +632,26 @@ 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 number = 8.14; // decimal? | None
|
||||
var _double = 1.2D; // double? | None
|
||||
var apiInstance = new FakeApi(Configuration.Default);
|
||||
var number = 8.14; // decimal | None
|
||||
var _double = 1.2D; // double | None
|
||||
var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None
|
||||
var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None
|
||||
var integer = 56; // int? | None (optional)
|
||||
var int32 = 56; // int? | None (optional)
|
||||
var int64 = 789; // long? | None (optional)
|
||||
var _float = 3.4F; // float? | None (optional)
|
||||
var integer = 56; // int | None (optional)
|
||||
var int32 = 56; // int | None (optional)
|
||||
var int64 = 789; // long | None (optional)
|
||||
var _float = 3.4F; // float | None (optional)
|
||||
var _string = _string_example; // string | None (optional)
|
||||
var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional)
|
||||
var date = 2013-10-20; // DateTime? | None (optional)
|
||||
var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional)
|
||||
var date = 2013-10-20; // DateTime | None (optional)
|
||||
var dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None (optional)
|
||||
var password = password_example; // string | None (optional)
|
||||
var callback = callback_example; // string | None (optional)
|
||||
|
||||
@@ -595,9 +660,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -609,18 +676,18 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**number** | **decimal?**| None |
|
||||
**_double** | **double?**| None |
|
||||
**number** | **decimal**| None |
|
||||
**_double** | **double**| None |
|
||||
**patternWithoutDelimiter** | **string**| None |
|
||||
**_byte** | **byte[]**| None |
|
||||
**integer** | **int?**| None | [optional]
|
||||
**int32** | **int?**| None | [optional]
|
||||
**int64** | **long?**| None | [optional]
|
||||
**_float** | **float?**| None | [optional]
|
||||
**integer** | **int**| None | [optional]
|
||||
**int32** | **int**| None | [optional]
|
||||
**int64** | **long**| None | [optional]
|
||||
**_float** | **float**| None | [optional]
|
||||
**_string** | **string**| None | [optional]
|
||||
**binary** | **System.IO.Stream**| None | [optional]
|
||||
**date** | **DateTime?**| None | [optional]
|
||||
**dateTime** | **DateTime?**| None | [optional]
|
||||
**date** | **DateTime**| None | [optional]
|
||||
**dateTime** | **DateTime**| None | [optional]
|
||||
**password** | **string**| None | [optional]
|
||||
**callback** | **string**| None | [optional]
|
||||
|
||||
@@ -637,6 +704,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)
|
||||
@@ -645,7 +718,7 @@ void (empty response body)
|
||||
|
||||
## TestEnumParameters
|
||||
|
||||
> void TestEnumParameters (List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List<string> enumFormStringArray = null, string enumFormString = null)
|
||||
> void TestEnumParameters (List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List<string> enumFormStringArray = null, string enumFormString = null)
|
||||
|
||||
To test enum parameters
|
||||
|
||||
@@ -654,7 +727,7 @@ To test enum parameters
|
||||
### Example
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@@ -664,15 +737,16 @@ 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)
|
||||
var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg)
|
||||
var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional)
|
||||
var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional)
|
||||
var enumQueryInteger = 56; // int | Query parameter enum test (double) (optional)
|
||||
var enumQueryDouble = 1.2D; // double | Query parameter enum test (double) (optional)
|
||||
var enumFormStringArray = new List<string>(); // List<string> | Form parameter enum test (string array) (optional) (default to $)
|
||||
var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg)
|
||||
|
||||
@@ -681,9 +755,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -699,8 +775,8 @@ Name | Type | Description | Notes
|
||||
**enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg]
|
||||
**enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional]
|
||||
**enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg]
|
||||
**enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional]
|
||||
**enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional]
|
||||
**enumQueryInteger** | **int**| Query parameter enum test (double) | [optional]
|
||||
**enumQueryDouble** | **double**| Query parameter enum test (double) | [optional]
|
||||
**enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $]
|
||||
**enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg]
|
||||
|
||||
@@ -717,6 +793,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)
|
||||
@@ -725,7 +807,7 @@ No authorization required
|
||||
|
||||
## TestGroupParameters
|
||||
|
||||
> void TestGroupParameters (int? requiredStringGroup, bool? requiredBooleanGroup, long? requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null)
|
||||
> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null)
|
||||
|
||||
Fake endpoint to test group parameters (optional)
|
||||
|
||||
@@ -734,7 +816,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;
|
||||
@@ -744,24 +826,27 @@ namespace Example
|
||||
{
|
||||
public class TestGroupParametersExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
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
|
||||
var stringGroup = 56; // int? | String in group parameters (optional)
|
||||
var booleanGroup = true; // bool? | Boolean in group parameters (optional)
|
||||
var int64Group = 789; // long? | Integer in group parameters (optional)
|
||||
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
|
||||
var stringGroup = 56; // int | String in group parameters (optional)
|
||||
var booleanGroup = true; // bool | Boolean in group parameters (optional)
|
||||
var int64Group = 789; // long | Integer in group parameters (optional)
|
||||
|
||||
try
|
||||
{
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -773,12 +858,12 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**requiredStringGroup** | **int?**| Required String in group parameters |
|
||||
**requiredBooleanGroup** | **bool?**| Required Boolean in group parameters |
|
||||
**requiredInt64Group** | **long?**| Required Integer in group parameters |
|
||||
**stringGroup** | **int?**| String in group parameters | [optional]
|
||||
**booleanGroup** | **bool?**| Boolean in group parameters | [optional]
|
||||
**int64Group** | **long?**| Integer in group parameters | [optional]
|
||||
**requiredStringGroup** | **int**| Required String in group parameters |
|
||||
**requiredBooleanGroup** | **bool**| Required Boolean in group parameters |
|
||||
**requiredInt64Group** | **long**| Required Integer in group parameters |
|
||||
**stringGroup** | **int**| String in group parameters | [optional]
|
||||
**booleanGroup** | **bool**| Boolean in group parameters | [optional]
|
||||
**int64Group** | **long**| Integer in group parameters | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -793,6 +878,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)
|
||||
@@ -808,7 +898,7 @@ test inline additionalProperties
|
||||
### Example
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@@ -818,9 +908,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
|
||||
@@ -828,9 +919,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -857,6 +950,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)
|
||||
@@ -872,7 +970,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;
|
||||
@@ -882,9 +980,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
|
||||
|
||||
@@ -893,9 +992,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -923,6 +1024,11 @@ 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)
|
||||
|
||||
@@ -19,7 +19,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;
|
||||
@@ -29,14 +29,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
|
||||
@@ -45,9 +46,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -74,6 +77,11 @@ 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)
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Integer** | **int?** | | [optional]
|
||||
**Int32** | **int?** | | [optional]
|
||||
**Int64** | **long?** | | [optional]
|
||||
**Number** | **decimal?** | |
|
||||
**Float** | **float?** | | [optional]
|
||||
**Double** | **double?** | | [optional]
|
||||
**Integer** | **int** | | [optional]
|
||||
**Int32** | **int** | | [optional]
|
||||
**Int64** | **long** | | [optional]
|
||||
**Number** | **decimal** | |
|
||||
**Float** | **float** | | [optional]
|
||||
**Double** | **double** | | [optional]
|
||||
**String** | **string** | | [optional]
|
||||
**Byte** | **byte[]** | |
|
||||
**Binary** | **System.IO.Stream** | | [optional]
|
||||
**Date** | **DateTime?** | |
|
||||
**DateTime** | **DateTime?** | | [optional]
|
||||
**Uuid** | **Guid?** | | [optional]
|
||||
**Date** | **DateTime** | |
|
||||
**DateTime** | **DateTime** | | [optional]
|
||||
**Uuid** | **Guid** | | [optional]
|
||||
**Password** | **string** | |
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
|
||||
@@ -7,8 +7,8 @@ Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional]
|
||||
**MapOfEnumString** | **Dictionary<string, string>** | | [optional]
|
||||
**DirectMap** | **Dictionary<string, bool?>** | | [optional]
|
||||
**IndirectMap** | **Dictionary<string, bool?>** | | [optional]
|
||||
**DirectMap** | **Dictionary<string, bool>** | | [optional]
|
||||
**IndirectMap** | **Dictionary<string, bool>** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Uuid** | **Guid?** | | [optional]
|
||||
**DateTime** | **DateTime?** | | [optional]
|
||||
**Uuid** | **Guid** | | [optional]
|
||||
**DateTime** | **DateTime** | | [optional]
|
||||
**Map** | [**Dictionary<string, Animal>**](Animal.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **int?** | | [optional]
|
||||
**Name** | **int** | | [optional]
|
||||
**Class** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Name** | **int?** | |
|
||||
**SnakeCase** | **int?** | | [optional]
|
||||
**_Name** | **int** | |
|
||||
**SnakeCase** | **int** | | [optional]
|
||||
**Property** | **string** | | [optional]
|
||||
**_123Number** | **int?** | | [optional]
|
||||
**_123Number** | **int** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**JustNumber** | **decimal?** | | [optional]
|
||||
**JustNumber** | **decimal** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**PetId** | **long?** | | [optional]
|
||||
**Quantity** | **int?** | | [optional]
|
||||
**ShipDate** | **DateTime?** | | [optional]
|
||||
**Id** | **long** | | [optional]
|
||||
**PetId** | **long** | | [optional]
|
||||
**Quantity** | **int** | | [optional]
|
||||
**ShipDate** | **DateTime** | | [optional]
|
||||
**Status** | **string** | Order Status | [optional]
|
||||
**Complete** | **bool?** | | [optional] [default to false]
|
||||
**Complete** | **bool** | | [optional] [default to false]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**MyNumber** | **decimal?** | | [optional]
|
||||
**MyNumber** | **decimal** | | [optional]
|
||||
**MyString** | **string** | | [optional]
|
||||
**MyBoolean** | **bool?** | | [optional]
|
||||
**MyBoolean** | **bool** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**Id** | **long** | | [optional]
|
||||
**Category** | [**Category**](Category.md) | | [optional]
|
||||
**Name** | **string** | |
|
||||
**PhotoUrls** | **List<string>** | |
|
||||
|
||||
@@ -25,7 +25,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;
|
||||
@@ -35,12 +35,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
|
||||
@@ -48,9 +49,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -77,6 +80,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)
|
||||
@@ -85,14 +94,14 @@ void (empty response body)
|
||||
|
||||
## DeletePet
|
||||
|
||||
> void DeletePet (long? petId, string apiKey = null)
|
||||
> void DeletePet (long petId, string apiKey = null)
|
||||
|
||||
Deletes a pet
|
||||
|
||||
### Example
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@@ -102,13 +111,14 @@ 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 petId = 789; // long? | Pet id to delete
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var petId = 789; // long | Pet id to delete
|
||||
var apiKey = apiKey_example; // string | (optional)
|
||||
|
||||
try
|
||||
@@ -116,9 +126,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,7 +142,7 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **long?**| Pet id to delete |
|
||||
**petId** | **long**| Pet id to delete |
|
||||
**apiKey** | **string**| | [optional]
|
||||
|
||||
### Return type
|
||||
@@ -146,6 +158,12 @@ 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)
|
||||
@@ -154,7 +172,7 @@ void (empty response body)
|
||||
|
||||
## FindPetsByStatus
|
||||
|
||||
> List<Pet> FindPetsByStatus (List<string> status)
|
||||
> List<Pet> FindPetsByStatus (List<string> status)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
@@ -163,7 +181,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;
|
||||
@@ -173,23 +191,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -205,7 +226,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@@ -216,6 +237,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 status value | - |
|
||||
|
||||
[[Back to top]](#)
|
||||
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
@@ -224,7 +251,7 @@ Name | Type | Description | Notes
|
||||
|
||||
## FindPetsByTags
|
||||
|
||||
> List<Pet> FindPetsByTags (List<string> tags)
|
||||
> List<Pet> FindPetsByTags (List<string> tags)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
@@ -233,7 +260,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;
|
||||
@@ -243,23 +270,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -275,7 +305,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@@ -286,6 +316,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)
|
||||
@@ -294,7 +330,7 @@ Name | Type | Description | Notes
|
||||
|
||||
## GetPetById
|
||||
|
||||
> Pet GetPetById (long? petId)
|
||||
> Pet GetPetById (long petId)
|
||||
|
||||
Find pet by ID
|
||||
|
||||
@@ -303,7 +339,7 @@ Returns a single pet
|
||||
### Example
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@@ -313,15 +349,16 @@ 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 petId = 789; // long? | ID of pet to return
|
||||
var apiInstance = new PetApi(Configuration.Default);
|
||||
var petId = 789; // long | ID of pet to return
|
||||
|
||||
try
|
||||
{
|
||||
@@ -329,9 +366,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -343,7 +382,7 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **long?**| ID of pet to return |
|
||||
**petId** | **long**| ID of pet to return |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -358,6 +397,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)
|
||||
@@ -373,7 +419,7 @@ Update an existing pet
|
||||
### Example
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@@ -383,12 +429,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
|
||||
@@ -396,9 +443,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -425,6 +474,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)
|
||||
@@ -433,14 +490,14 @@ void (empty response body)
|
||||
|
||||
## UpdatePetWithForm
|
||||
|
||||
> void UpdatePetWithForm (long? petId, string name = null, string status = null)
|
||||
> void UpdatePetWithForm (long petId, string name = null, string status = null)
|
||||
|
||||
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;
|
||||
@@ -450,13 +507,14 @@ 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 petId = 789; // long? | ID of pet that needs to be updated
|
||||
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)
|
||||
|
||||
@@ -465,9 +523,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -479,7 +539,7 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **long?**| ID of pet that needs to be updated |
|
||||
**petId** | **long**| ID of pet that needs to be updated |
|
||||
**name** | **string**| Updated name of the pet | [optional]
|
||||
**status** | **string**| Updated status of the pet | [optional]
|
||||
|
||||
@@ -496,6 +556,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)
|
||||
@@ -504,14 +569,14 @@ void (empty response body)
|
||||
|
||||
## UploadFile
|
||||
|
||||
> ApiResponse UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
|
||||
> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null)
|
||||
|
||||
uploads an image
|
||||
|
||||
### Example
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@@ -521,13 +586,14 @@ 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 petId = 789; // long? | ID of pet to update
|
||||
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)
|
||||
|
||||
@@ -537,9 +603,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -551,7 +619,7 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **long?**| ID of pet to update |
|
||||
**petId** | **long**| ID of pet to update |
|
||||
**additionalMetadata** | **string**| Additional data to pass to server | [optional]
|
||||
**file** | **System.IO.Stream**| file to upload | [optional]
|
||||
|
||||
@@ -568,6 +636,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)
|
||||
@@ -576,14 +649,14 @@ Name | Type | Description | Notes
|
||||
|
||||
## UploadFileWithRequiredFile
|
||||
|
||||
> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null)
|
||||
> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
### Example
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
@@ -593,13 +666,14 @@ 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 petId = 789; // long? | ID of pet to update
|
||||
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)
|
||||
|
||||
@@ -609,9 +683,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -623,7 +699,7 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **long?**| ID of pet to update |
|
||||
**petId** | **long**| ID of pet to update |
|
||||
**requiredFile** | **System.IO.Stream**| file to upload |
|
||||
**additionalMetadata** | **string**| Additional data to pass to server | [optional]
|
||||
|
||||
@@ -640,6 +716,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)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Return** | **int?** | | [optional]
|
||||
**_Return** | **int** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**SpecialPropertyName** | **long?** | | [optional]
|
||||
**SpecialPropertyName** | **long** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
|
||||
@@ -22,7 +22,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;
|
||||
@@ -32,9 +32,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
|
||||
@@ -42,9 +43,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -71,6 +74,12 @@ 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)
|
||||
@@ -79,7 +88,7 @@ No authorization required
|
||||
|
||||
## GetInventory
|
||||
|
||||
> Dictionary<string, int?> GetInventory ()
|
||||
> Dictionary<string, int> GetInventory ()
|
||||
|
||||
Returns pet inventories by status
|
||||
|
||||
@@ -88,7 +97,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;
|
||||
@@ -98,24 +107,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -128,7 +140,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**Dictionary<string, int?>**
|
||||
**Dictionary<string, int>**
|
||||
|
||||
### Authorization
|
||||
|
||||
@@ -139,6 +151,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)
|
||||
@@ -147,7 +164,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
## GetOrderById
|
||||
|
||||
> Order GetOrderById (long? orderId)
|
||||
> Order GetOrderById (long orderId)
|
||||
|
||||
Find purchase order by ID
|
||||
|
||||
@@ -156,7 +173,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;
|
||||
@@ -166,10 +183,11 @@ namespace Example
|
||||
{
|
||||
public class GetOrderByIdExample
|
||||
{
|
||||
public void main()
|
||||
public static void Main()
|
||||
{
|
||||
var apiInstance = new StoreApi();
|
||||
var orderId = 789; // long? | ID of pet that needs to be fetched
|
||||
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
|
||||
{
|
||||
@@ -177,9 +195,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,7 +211,7 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **long?**| ID of pet that needs to be fetched |
|
||||
**orderId** | **long**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -206,6 +226,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)
|
||||
@@ -221,7 +248,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;
|
||||
@@ -231,9 +258,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
|
||||
@@ -242,9 +270,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -271,6 +301,12 @@ 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)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**Id** | **long** | | [optional]
|
||||
**Name** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**StringItem** | **string** | | [default to "what"]
|
||||
**NumberItem** | **decimal?** | |
|
||||
**IntegerItem** | **int?** | |
|
||||
**BoolItem** | **bool?** | | [default to true]
|
||||
**ArrayItem** | **List<int?>** | |
|
||||
**NumberItem** | **decimal** | |
|
||||
**IntegerItem** | **int** | |
|
||||
**BoolItem** | **bool** | | [default to true]
|
||||
**ArrayItem** | **List<int>** | |
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**StringItem** | **string** | |
|
||||
**NumberItem** | **decimal?** | |
|
||||
**IntegerItem** | **int?** | |
|
||||
**BoolItem** | **bool?** | |
|
||||
**ArrayItem** | **List<int?>** | |
|
||||
**NumberItem** | **decimal** | |
|
||||
**IntegerItem** | **int** | |
|
||||
**BoolItem** | **bool** | |
|
||||
**ArrayItem** | **List<int>** | |
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**Id** | **long** | | [optional]
|
||||
**Username** | **string** | | [optional]
|
||||
**FirstName** | **string** | | [optional]
|
||||
**LastName** | **string** | | [optional]
|
||||
**Email** | **string** | | [optional]
|
||||
**Password** | **string** | | [optional]
|
||||
**Phone** | **string** | | [optional]
|
||||
**UserStatus** | **int?** | User Status | [optional]
|
||||
**UserStatus** | **int** | User Status | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
|
||||
@@ -26,7 +26,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;
|
||||
@@ -36,9 +36,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
|
||||
@@ -46,9 +47,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -75,6 +78,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)
|
||||
@@ -90,7 +98,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;
|
||||
@@ -100,9 +108,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
|
||||
@@ -110,9 +119,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -124,7 +135,7 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**List<User>**](List.md)| List of user object |
|
||||
**body** | [**List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -139,6 +150,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)
|
||||
@@ -154,7 +170,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;
|
||||
@@ -164,9 +180,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
|
||||
@@ -174,9 +191,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,7 +207,7 @@ namespace Example
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**List<User>**](List.md)| List of user object |
|
||||
**body** | [**List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -203,6 +222,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)
|
||||
@@ -220,7 +244,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;
|
||||
@@ -230,9 +254,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
|
||||
@@ -240,9 +265,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -269,6 +296,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)
|
||||
@@ -284,7 +317,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;
|
||||
@@ -294,9 +327,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
|
||||
@@ -305,9 +339,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -334,6 +370,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)
|
||||
@@ -349,7 +392,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;
|
||||
@@ -359,9 +402,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
|
||||
|
||||
@@ -371,9 +415,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -401,6 +447,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)
|
||||
@@ -416,7 +468,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;
|
||||
@@ -426,18 +478,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -461,6 +516,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)
|
||||
@@ -478,7 +538,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;
|
||||
@@ -488,9 +548,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
|
||||
|
||||
@@ -499,9 +560,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -529,6 +592,12 @@ 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)
|
||||
|
||||
@@ -6,34 +6,34 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**AttributeString** | **string** | | [optional]
|
||||
**AttributeNumber** | **decimal?** | | [optional]
|
||||
**AttributeInteger** | **int?** | | [optional]
|
||||
**AttributeBoolean** | **bool?** | | [optional]
|
||||
**WrappedArray** | **List<int?>** | | [optional]
|
||||
**AttributeNumber** | **decimal** | | [optional]
|
||||
**AttributeInteger** | **int** | | [optional]
|
||||
**AttributeBoolean** | **bool** | | [optional]
|
||||
**WrappedArray** | **List<int>** | | [optional]
|
||||
**NameString** | **string** | | [optional]
|
||||
**NameNumber** | **decimal?** | | [optional]
|
||||
**NameInteger** | **int?** | | [optional]
|
||||
**NameBoolean** | **bool?** | | [optional]
|
||||
**NameArray** | **List<int?>** | | [optional]
|
||||
**NameWrappedArray** | **List<int?>** | | [optional]
|
||||
**NameNumber** | **decimal** | | [optional]
|
||||
**NameInteger** | **int** | | [optional]
|
||||
**NameBoolean** | **bool** | | [optional]
|
||||
**NameArray** | **List<int>** | | [optional]
|
||||
**NameWrappedArray** | **List<int>** | | [optional]
|
||||
**PrefixString** | **string** | | [optional]
|
||||
**PrefixNumber** | **decimal?** | | [optional]
|
||||
**PrefixInteger** | **int?** | | [optional]
|
||||
**PrefixBoolean** | **bool?** | | [optional]
|
||||
**PrefixArray** | **List<int?>** | | [optional]
|
||||
**PrefixWrappedArray** | **List<int?>** | | [optional]
|
||||
**PrefixNumber** | **decimal** | | [optional]
|
||||
**PrefixInteger** | **int** | | [optional]
|
||||
**PrefixBoolean** | **bool** | | [optional]
|
||||
**PrefixArray** | **List<int>** | | [optional]
|
||||
**PrefixWrappedArray** | **List<int>** | | [optional]
|
||||
**NamespaceString** | **string** | | [optional]
|
||||
**NamespaceNumber** | **decimal?** | | [optional]
|
||||
**NamespaceInteger** | **int?** | | [optional]
|
||||
**NamespaceBoolean** | **bool?** | | [optional]
|
||||
**NamespaceArray** | **List<int?>** | | [optional]
|
||||
**NamespaceWrappedArray** | **List<int?>** | | [optional]
|
||||
**NamespaceNumber** | **decimal** | | [optional]
|
||||
**NamespaceInteger** | **int** | | [optional]
|
||||
**NamespaceBoolean** | **bool** | | [optional]
|
||||
**NamespaceArray** | **List<int>** | | [optional]
|
||||
**NamespaceWrappedArray** | **List<int>** | | [optional]
|
||||
**PrefixNsString** | **string** | | [optional]
|
||||
**PrefixNsNumber** | **decimal?** | | [optional]
|
||||
**PrefixNsInteger** | **int?** | | [optional]
|
||||
**PrefixNsBoolean** | **bool?** | | [optional]
|
||||
**PrefixNsArray** | **List<int?>** | | [optional]
|
||||
**PrefixNsWrappedArray** | **List<int?>** | | [optional]
|
||||
**PrefixNsNumber** | **decimal** | | [optional]
|
||||
**PrefixNsInteger** | **int** | | [optional]
|
||||
**PrefixNsBoolean** | **bool** | | [optional]
|
||||
**PrefixNsArray** | **List<int>** | | [optional]
|
||||
**PrefixNsWrappedArray** | **List<int>** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
|
||||
Reference in New Issue
Block a user