forked from loafle/openapi-generator-original
update c# petstore samples
This commit is contained in:
@@ -100,6 +100,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||
*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
*Fake_classname_tags123Api* | [**TestClassname**](docs/Fake_classname_tags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
|
||||
*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
|
||||
@@ -11,6 +11,7 @@ Method | HTTP request | Description
|
||||
[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||
[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||
[**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
<a name="fakeouterbooleanserialize"></a>
|
||||
@@ -478,3 +479,65 @@ No authorization required
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="testjsonformdata"></a>
|
||||
# **TestJsonFormData**
|
||||
> void TestJsonFormData (string param, string param2)
|
||||
|
||||
test json serialization of form data
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestJsonFormDataExample
|
||||
{
|
||||
public void main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
var param = param_example; // string | field1
|
||||
var param2 = param2_example; // string | field2
|
||||
|
||||
try
|
||||
{
|
||||
// test json serialization of form data
|
||||
apiInstance.TestJsonFormData(param, param2);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestJsonFormData: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **string**| field1 |
|
||||
**param2** | **string**| field2 |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -211,6 +211,29 @@ namespace IO.Swagger.Api
|
||||
/// <param name="enumQueryDouble">Query parameter enum test (double) (optional)</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestEnumParametersWithHttpInfo (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null);
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns></returns>
|
||||
void TestJsonFormData (string param, string param2);
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestJsonFormDataWithHttpInfo (string param, string param2);
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
@@ -400,6 +423,29 @@ namespace IO.Swagger.Api
|
||||
/// <param name="enumQueryDouble">Query parameter enum test (double) (optional)</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestEnumParametersAsyncWithHttpInfo (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null);
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task TestJsonFormDataAsync (string param, string param2);
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestJsonFormDataAsyncWithHttpInfo (string param, string param2);
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
@@ -1620,5 +1666,148 @@ namespace IO.Swagger.Api
|
||||
null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns></returns>
|
||||
public void TestJsonFormData (string param, string param2)
|
||||
{
|
||||
TestJsonFormDataWithHttpInfo(param, param2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public ApiResponse<Object> TestJsonFormDataWithHttpInfo (string param, string param2)
|
||||
{
|
||||
// verify the required parameter 'param' is set
|
||||
if (param == null)
|
||||
throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData");
|
||||
// verify the required parameter 'param2' is set
|
||||
if (param2 == null)
|
||||
throw new ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData");
|
||||
|
||||
var localVarPath = "/fake/jsonFormData";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
||||
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<String, String>();
|
||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
String[] localVarHttpContentTypes = new String[] {
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (param != null) localVarFormParams.Add("param", Configuration.ApiClient.ParameterToString(param)); // form parameter
|
||||
if (param2 != null) localVarFormParams.Add("param2", Configuration.ApiClient.ParameterToString(param2)); // form parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("TestJsonFormData", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<Object>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task TestJsonFormDataAsync (string param, string param2)
|
||||
{
|
||||
await TestJsonFormDataAsyncWithHttpInfo(param, param2);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> TestJsonFormDataAsyncWithHttpInfo (string param, string param2)
|
||||
{
|
||||
// verify the required parameter 'param' is set
|
||||
if (param == null)
|
||||
throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData");
|
||||
// verify the required parameter 'param2' is set
|
||||
if (param2 == null)
|
||||
throw new ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData");
|
||||
|
||||
var localVarPath = "/fake/jsonFormData";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
||||
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<String, String>();
|
||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
String[] localVarHttpContentTypes = new String[] {
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (param != null) localVarFormParams.Add("param", Configuration.ApiClient.ParameterToString(param)); // form parameter
|
||||
if (param2 != null) localVarFormParams.Add("param2", Configuration.ApiClient.ParameterToString(param2)); // form parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("TestJsonFormData", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<Object>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
null);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,6 +80,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||
*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
*Fake_classname_tags123Api* | [**TestClassname**](docs/Fake_classname_tags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
|
||||
*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
|
||||
@@ -11,6 +11,7 @@ Method | HTTP request | Description
|
||||
[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||
[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||
[**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
<a name="fakeouterbooleanserialize"></a>
|
||||
@@ -478,3 +479,65 @@ No authorization required
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="testjsonformdata"></a>
|
||||
# **TestJsonFormData**
|
||||
> void TestJsonFormData (string param, string param2)
|
||||
|
||||
test json serialization of form data
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestJsonFormDataExample
|
||||
{
|
||||
public void main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
var param = param_example; // string | field1
|
||||
var param2 = param2_example; // string | field2
|
||||
|
||||
try
|
||||
{
|
||||
// test json serialization of form data
|
||||
apiInstance.TestJsonFormData(param, param2);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestJsonFormData: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **string**| field1 |
|
||||
**param2** | **string**| field2 |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -211,6 +211,29 @@ namespace IO.Swagger.Api
|
||||
/// <param name="enumQueryDouble">Query parameter enum test (double) (optional)</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestEnumParametersWithHttpInfo (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null);
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns></returns>
|
||||
void TestJsonFormData (string param, string param2);
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestJsonFormDataWithHttpInfo (string param, string param2);
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
@@ -400,6 +423,29 @@ namespace IO.Swagger.Api
|
||||
/// <param name="enumQueryDouble">Query parameter enum test (double) (optional)</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestEnumParametersAsyncWithHttpInfo (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null);
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task TestJsonFormDataAsync (string param, string param2);
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestJsonFormDataAsyncWithHttpInfo (string param, string param2);
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
@@ -1620,5 +1666,148 @@ namespace IO.Swagger.Api
|
||||
null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns></returns>
|
||||
public void TestJsonFormData (string param, string param2)
|
||||
{
|
||||
TestJsonFormDataWithHttpInfo(param, param2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public ApiResponse<Object> TestJsonFormDataWithHttpInfo (string param, string param2)
|
||||
{
|
||||
// verify the required parameter 'param' is set
|
||||
if (param == null)
|
||||
throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData");
|
||||
// verify the required parameter 'param2' is set
|
||||
if (param2 == null)
|
||||
throw new ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData");
|
||||
|
||||
var localVarPath = "./fake/jsonFormData";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
||||
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<String, String>();
|
||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
String[] localVarHttpContentTypes = new String[] {
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (param != null) localVarFormParams.Add("param", Configuration.ApiClient.ParameterToString(param)); // form parameter
|
||||
if (param2 != null) localVarFormParams.Add("param2", Configuration.ApiClient.ParameterToString(param2)); // form parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("TestJsonFormData", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<Object>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||
null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task TestJsonFormDataAsync (string param, string param2)
|
||||
{
|
||||
await TestJsonFormDataAsyncWithHttpInfo(param, param2);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> TestJsonFormDataAsyncWithHttpInfo (string param, string param2)
|
||||
{
|
||||
// verify the required parameter 'param' is set
|
||||
if (param == null)
|
||||
throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData");
|
||||
// verify the required parameter 'param2' is set
|
||||
if (param2 == null)
|
||||
throw new ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData");
|
||||
|
||||
var localVarPath = "./fake/jsonFormData";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
||||
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<String, String>();
|
||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
String[] localVarHttpContentTypes = new String[] {
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (param != null) localVarFormParams.Add("param", Configuration.ApiClient.ParameterToString(param)); // form parameter
|
||||
if (param2 != null) localVarFormParams.Add("param2", Configuration.ApiClient.ParameterToString(param2)); // form parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("TestJsonFormData", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<Object>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||
null);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,6 +100,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||
*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
*Fake_classname_tags123Api* | [**TestClassname**](docs/Fake_classname_tags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
|
||||
*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
|
||||
@@ -11,6 +11,7 @@ Method | HTTP request | Description
|
||||
[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||
[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||
[**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
<a name="fakeouterbooleanserialize"></a>
|
||||
@@ -478,3 +479,65 @@ No authorization required
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="testjsonformdata"></a>
|
||||
# **TestJsonFormData**
|
||||
> void TestJsonFormData (string param, string param2)
|
||||
|
||||
test json serialization of form data
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Client;
|
||||
using IO.Swagger.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestJsonFormDataExample
|
||||
{
|
||||
public void main()
|
||||
{
|
||||
var apiInstance = new FakeApi();
|
||||
var param = param_example; // string | field1
|
||||
var param2 = param2_example; // string | field2
|
||||
|
||||
try
|
||||
{
|
||||
// test json serialization of form data
|
||||
apiInstance.TestJsonFormData(param, param2);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestJsonFormData: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **string**| field1 |
|
||||
**param2** | **string**| field2 |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -211,6 +211,29 @@ namespace IO.Swagger.Api
|
||||
/// <param name="enumQueryDouble">Query parameter enum test (double) (optional)</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestEnumParametersWithHttpInfo (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null);
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns></returns>
|
||||
void TestJsonFormData (string param, string param2);
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestJsonFormDataWithHttpInfo (string param, string param2);
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
@@ -400,6 +423,29 @@ namespace IO.Swagger.Api
|
||||
/// <param name="enumQueryDouble">Query parameter enum test (double) (optional)</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestEnumParametersAsyncWithHttpInfo (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null);
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task TestJsonFormDataAsync (string param, string param2);
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestJsonFormDataAsyncWithHttpInfo (string param, string param2);
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
@@ -1620,5 +1666,148 @@ namespace IO.Swagger.Api
|
||||
null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns></returns>
|
||||
public void TestJsonFormData (string param, string param2)
|
||||
{
|
||||
TestJsonFormDataWithHttpInfo(param, param2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public ApiResponse<Object> TestJsonFormDataWithHttpInfo (string param, string param2)
|
||||
{
|
||||
// verify the required parameter 'param' is set
|
||||
if (param == null)
|
||||
throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData");
|
||||
// verify the required parameter 'param2' is set
|
||||
if (param2 == null)
|
||||
throw new ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData");
|
||||
|
||||
var localVarPath = "/fake/jsonFormData";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
||||
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<String, String>();
|
||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
String[] localVarHttpContentTypes = new String[] {
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (param != null) localVarFormParams.Add("param", Configuration.ApiClient.ParameterToString(param)); // form parameter
|
||||
if (param2 != null) localVarFormParams.Add("param2", Configuration.ApiClient.ParameterToString(param2)); // form parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("TestJsonFormData", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<Object>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task TestJsonFormDataAsync (string param, string param2)
|
||||
{
|
||||
await TestJsonFormDataAsyncWithHttpInfo(param, param2);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="param">field1</param>
|
||||
/// <param name="param2">field2</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> TestJsonFormDataAsyncWithHttpInfo (string param, string param2)
|
||||
{
|
||||
// verify the required parameter 'param' is set
|
||||
if (param == null)
|
||||
throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData");
|
||||
// verify the required parameter 'param2' is set
|
||||
if (param2 == null)
|
||||
throw new ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData");
|
||||
|
||||
var localVarPath = "/fake/jsonFormData";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
||||
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<String, String>();
|
||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
String[] localVarHttpContentTypes = new String[] {
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (param != null) localVarFormParams.Add("param", Configuration.ApiClient.ParameterToString(param)); // form parameter
|
||||
if (param2 != null) localVarFormParams.Add("param2", Configuration.ApiClient.ParameterToString(param2)); // form parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("TestJsonFormData", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<Object>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
null);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user