forked from loafle/openapi-generator-original
use model class for request body with additionalProperties (#16613)
* try out simple fix * add test case * generate samples
This commit is contained in:
@@ -7234,7 +7234,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
}
|
||||
|
||||
protected void updateRequestBodyForMap(CodegenParameter codegenParameter, Schema schema, String name, Set<String> imports, String bodyParameterName) {
|
||||
if (ModelUtils.isGenerateAliasAsModel(schema) && StringUtils.isNotBlank(name)) {
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
this.addBodyModelSchema(codegenParameter, name, schema, imports, bodyParameterName, true);
|
||||
} else {
|
||||
Schema inner = ModelUtils.getAdditionalProperties(schema);
|
||||
|
||||
@@ -980,6 +980,27 @@ paths:
|
||||
type: string
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test inline free-form additionalProperties
|
||||
description: ''
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
additionalProperties: true
|
||||
description: request body
|
||||
required: true
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
tags:
|
||||
|
||||
@@ -977,6 +977,27 @@ paths:
|
||||
type: string
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test inline free-form additionalProperties
|
||||
description: ''
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
additionalProperties: true
|
||||
description: request body
|
||||
required: true
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
tags:
|
||||
|
||||
@@ -965,6 +965,27 @@ paths:
|
||||
type: string
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test inline free-form additionalProperties
|
||||
description: ''
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
additionalProperties: true
|
||||
description: request body
|
||||
required: true
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
tags:
|
||||
|
||||
@@ -963,6 +963,27 @@ paths:
|
||||
type: string
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test inline free-form additionalProperties
|
||||
description: ''
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
additionalProperties: true
|
||||
description: request body
|
||||
required: true
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
tags:
|
||||
|
||||
@@ -939,6 +939,27 @@ paths:
|
||||
type: string
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test inline free-form additionalProperties
|
||||
description: ''
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
additionalProperties: true
|
||||
description: request body
|
||||
required: true
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
tags:
|
||||
|
||||
@@ -943,6 +943,27 @@ paths:
|
||||
type: string
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test inline free-form additionalProperties
|
||||
description: ''
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
additionalProperties: true
|
||||
description: request body
|
||||
required: true
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
tags:
|
||||
|
||||
@@ -978,6 +978,27 @@ paths:
|
||||
type: string
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test inline free-form additionalProperties
|
||||
description: ''
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
additionalProperties: true
|
||||
description: request body
|
||||
required: true
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
tags:
|
||||
|
||||
@@ -959,6 +959,27 @@ paths:
|
||||
type: string
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test inline free-form additionalProperties
|
||||
description: ''
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
additionalProperties: true
|
||||
description: request body
|
||||
required: true
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
tags:
|
||||
|
||||
@@ -1014,6 +1014,27 @@ paths:
|
||||
type: string
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test inline free-form additionalProperties
|
||||
description: ''
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
additionalProperties: true
|
||||
description: request body
|
||||
required: true
|
||||
/fake/nullable:
|
||||
post:
|
||||
tags:
|
||||
|
||||
@@ -1014,6 +1014,27 @@ paths:
|
||||
type: string
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test inline free-form additionalProperties
|
||||
description: ''
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
additionalProperties: true
|
||||
description: request body
|
||||
required: true
|
||||
/fake/nullable:
|
||||
post:
|
||||
tags:
|
||||
|
||||
@@ -1014,6 +1014,27 @@ paths:
|
||||
type: string
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test inline free-form additionalProperties
|
||||
description: ''
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
additionalProperties: true
|
||||
description: request body
|
||||
required: true
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
tags:
|
||||
|
||||
@@ -944,6 +944,27 @@ paths:
|
||||
type: string
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test inline free-form additionalProperties
|
||||
description: ''
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
additionalProperties: true
|
||||
description: request body
|
||||
required: true
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
tags:
|
||||
|
||||
@@ -1066,6 +1066,27 @@ paths:
|
||||
type: string
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test inline free-form additionalProperties
|
||||
description: ''
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
additionalProperties: true
|
||||
description: request body
|
||||
required: true
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
tags:
|
||||
|
||||
@@ -1002,6 +1002,27 @@ paths:
|
||||
type: string
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test inline free-form additionalProperties
|
||||
description: ''
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
additionalProperties: true
|
||||
description: request body
|
||||
required: true
|
||||
/fake/date-time-query-params:
|
||||
put:
|
||||
tags:
|
||||
|
||||
@@ -1050,6 +1050,27 @@ paths:
|
||||
type: string
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test inline free-form additionalProperties
|
||||
description: ''
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
additionalProperties: true
|
||||
description: request body
|
||||
required: true
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
tags:
|
||||
|
||||
@@ -90,6 +90,7 @@ docs/StoreApi.md
|
||||
docs/Tag.md
|
||||
docs/TestCollectionEndingWithWordList.md
|
||||
docs/TestCollectionEndingWithWordListObject.md
|
||||
docs/TestInlineFreeformAdditionalPropertiesRequest.md
|
||||
docs/Triangle.md
|
||||
docs/TriangleInterface.md
|
||||
docs/User.md
|
||||
@@ -209,6 +210,7 @@ src/Org.OpenAPITools/Model/SpecialModelName.cs
|
||||
src/Org.OpenAPITools/Model/Tag.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs
|
||||
src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs
|
||||
src/Org.OpenAPITools/Model/Triangle.cs
|
||||
src/Org.OpenAPITools/Model/TriangleInterface.cs
|
||||
src/Org.OpenAPITools/Model/User.cs
|
||||
|
||||
@@ -122,6 +122,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||
*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
*FakeApi* | [**TestInlineFreeformAdditionalProperties**](docs/FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties
|
||||
*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters |
|
||||
*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
@@ -232,6 +233,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.Tag](docs/Tag.md)
|
||||
- [Model.TestCollectionEndingWithWordList](docs/TestCollectionEndingWithWordList.md)
|
||||
- [Model.TestCollectionEndingWithWordListObject](docs/TestCollectionEndingWithWordListObject.md)
|
||||
- [Model.TestInlineFreeformAdditionalPropertiesRequest](docs/TestInlineFreeformAdditionalPropertiesRequest.md)
|
||||
- [Model.Triangle](docs/Triangle.md)
|
||||
- [Model.TriangleInterface](docs/TriangleInterface.md)
|
||||
- [Model.User](docs/User.md)
|
||||
|
||||
@@ -943,6 +943,23 @@ paths:
|
||||
summary: test inline additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/testInlineFreeformAdditionalProperties_request'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test inline free-form additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
operationId: testBodyWithQueryParams
|
||||
@@ -2488,6 +2505,12 @@ components:
|
||||
- param
|
||||
- param2
|
||||
type: object
|
||||
testInlineFreeformAdditionalProperties_request:
|
||||
additionalProperties: true
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
type: object
|
||||
uploadFileWithRequiredFile_request:
|
||||
properties:
|
||||
additionalMetadata:
|
||||
|
||||
@@ -17,6 +17,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters |
|
||||
| [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) |
|
||||
| [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties |
|
||||
| [**TestInlineFreeformAdditionalProperties**](FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties |
|
||||
| [**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data |
|
||||
| [**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | |
|
||||
|
||||
@@ -1205,6 +1206,91 @@ No authorization required
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a id="testinlinefreeformadditionalproperties"></a>
|
||||
# **TestInlineFreeformAdditionalProperties**
|
||||
> void TestInlineFreeformAdditionalProperties (TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
|
||||
test inline free-form additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestInlineFreeformAdditionalPropertiesExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var testInlineFreeformAdditionalPropertiesRequest = new TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalProperties: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestInlineFreeformAdditionalPropertiesWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalPropertiesWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.TestInlineFreeformAdditionalPropertiesRequest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**SomeProperty** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class TestInlineFreeformAdditionalPropertiesRequestTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for TestInlineFreeformAdditionalPropertiesRequest
|
||||
//private TestInlineFreeformAdditionalPropertiesRequest instance;
|
||||
|
||||
public TestInlineFreeformAdditionalPropertiesRequestTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
//instance = new TestInlineFreeformAdditionalPropertiesRequest();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestInlineFreeformAdditionalPropertiesRequestInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" TestInlineFreeformAdditionalPropertiesRequest
|
||||
//Assert.IsType<TestInlineFreeformAdditionalPropertiesRequest>(instance);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'SomeProperty'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void SomePropertyTest()
|
||||
{
|
||||
// TODO unit test for the property 'SomeProperty'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -365,6 +365,26 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestInlineAdditionalPropertiesWithHttpInfo(Dictionary<string, string> requestBody, int operationIndex = 0);
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
void TestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0);
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0);
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
@@ -810,6 +830,31 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary<string, string> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestInlineFreeformAdditionalPropertiesWithHttpInfoAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@@ -3093,6 +3138,148 @@ namespace Org.OpenAPITools.Api
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
public void TestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0)
|
||||
{
|
||||
TestInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<Object> TestInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0)
|
||||
{
|
||||
// verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set
|
||||
if (testInlineFreeformAdditionalPropertiesRequest == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties");
|
||||
}
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = testInlineFreeformAdditionalPropertiesRequest;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestInlineFreeformAdditionalProperties";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Post<Object>("/fake/inline-freeform-additionalProperties", localVarRequestOptions, this.Configuration);
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestInlineFreeformAdditionalProperties", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
await TestInlineFreeformAdditionalPropertiesWithHttpInfoAsync(testInlineFreeformAdditionalPropertiesRequest, operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> TestInlineFreeformAdditionalPropertiesWithHttpInfoAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
// verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set
|
||||
if (testInlineFreeformAdditionalPropertiesRequest == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties");
|
||||
}
|
||||
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = testInlineFreeformAdditionalPropertiesRequest;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestInlineFreeformAdditionalProperties";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/fake/inline-freeform-additionalProperties", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestInlineFreeformAdditionalProperties", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
[DataContract(Name = "testInlineFreeformAdditionalProperties_request")]
|
||||
public partial class TestInlineFreeformAdditionalPropertiesRequest : Dictionary<String, Object>, IEquatable<TestInlineFreeformAdditionalPropertiesRequest>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TestInlineFreeformAdditionalPropertiesRequest" /> class.
|
||||
/// </summary>
|
||||
/// <param name="someProperty">someProperty.</param>
|
||||
public TestInlineFreeformAdditionalPropertiesRequest(string someProperty = default(string)) : base()
|
||||
{
|
||||
this._SomeProperty = someProperty;
|
||||
if (this.SomeProperty != null)
|
||||
{
|
||||
this._flagSomeProperty = true;
|
||||
}
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets SomeProperty
|
||||
/// </summary>
|
||||
[DataMember(Name = "someProperty", EmitDefaultValue = false)]
|
||||
public string SomeProperty
|
||||
{
|
||||
get{ return _SomeProperty;}
|
||||
set
|
||||
{
|
||||
_SomeProperty = value;
|
||||
_flagSomeProperty = true;
|
||||
}
|
||||
}
|
||||
private string _SomeProperty;
|
||||
private bool _flagSomeProperty;
|
||||
|
||||
/// <summary>
|
||||
/// Returns false as SomeProperty should not be serialized given that it's read-only.
|
||||
/// </summary>
|
||||
/// <returns>false (boolean)</returns>
|
||||
public bool ShouldSerializeSomeProperty()
|
||||
{
|
||||
return _flagSomeProperty;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, object> AdditionalProperties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class TestInlineFreeformAdditionalPropertiesRequest {\n");
|
||||
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append(" SomeProperty: ").Append(SomeProperty).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input as TestInlineFreeformAdditionalPropertiesRequest).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if TestInlineFreeformAdditionalPropertiesRequest instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of TestInlineFreeformAdditionalPropertiesRequest to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(TestInlineFreeformAdditionalPropertiesRequest input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = base.GetHashCode();
|
||||
if (this.SomeProperty != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.SomeProperty.GetHashCode();
|
||||
}
|
||||
if (this.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
return this.BaseValidate(validationContext);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
protected IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> BaseValidate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -91,6 +91,7 @@ docs/models/SpecialModelName.md
|
||||
docs/models/Tag.md
|
||||
docs/models/TestCollectionEndingWithWordList.md
|
||||
docs/models/TestCollectionEndingWithWordListObject.md
|
||||
docs/models/TestInlineFreeformAdditionalPropertiesRequest.md
|
||||
docs/models/Triangle.md
|
||||
docs/models/TriangleInterface.md
|
||||
docs/models/User.md
|
||||
@@ -217,6 +218,7 @@ src/UseSourceGeneration/Model/SpecialModelName.cs
|
||||
src/UseSourceGeneration/Model/Tag.cs
|
||||
src/UseSourceGeneration/Model/TestCollectionEndingWithWordList.cs
|
||||
src/UseSourceGeneration/Model/TestCollectionEndingWithWordListObject.cs
|
||||
src/UseSourceGeneration/Model/TestInlineFreeformAdditionalPropertiesRequest.cs
|
||||
src/UseSourceGeneration/Model/Triangle.cs
|
||||
src/UseSourceGeneration/Model/TriangleInterface.cs
|
||||
src/UseSourceGeneration/Model/User.cs
|
||||
|
||||
@@ -943,6 +943,23 @@ paths:
|
||||
summary: test inline additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/testInlineFreeformAdditionalProperties_request'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test inline free-form additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
operationId: testBodyWithQueryParams
|
||||
@@ -2488,6 +2505,12 @@ components:
|
||||
- param
|
||||
- param2
|
||||
type: object
|
||||
testInlineFreeformAdditionalProperties_request:
|
||||
additionalProperties: true
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
type: object
|
||||
uploadFileWithRequiredFile_request:
|
||||
properties:
|
||||
additionalMetadata:
|
||||
|
||||
@@ -17,6 +17,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters |
|
||||
| [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) |
|
||||
| [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties |
|
||||
| [**TestInlineFreeformAdditionalProperties**](FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties |
|
||||
| [**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data |
|
||||
| [**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | |
|
||||
|
||||
@@ -1205,6 +1206,91 @@ No authorization required
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
||||
|
||||
<a id="testinlinefreeformadditionalproperties"></a>
|
||||
# **TestInlineFreeformAdditionalProperties**
|
||||
> void TestInlineFreeformAdditionalProperties (TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
|
||||
test inline free-form additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using UseSourceGeneration.Api;
|
||||
using UseSourceGeneration.Client;
|
||||
using UseSourceGeneration.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestInlineFreeformAdditionalPropertiesExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var testInlineFreeformAdditionalPropertiesRequest = new TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalProperties: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestInlineFreeformAdditionalPropertiesWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalPropertiesWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# UseSourceGeneration.Model.TestInlineFreeformAdditionalPropertiesRequest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**SomeProperty** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using UseSourceGeneration.Model;
|
||||
using UseSourceGeneration.Client;
|
||||
using System.Reflection;
|
||||
|
||||
namespace UseSourceGeneration.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class TestInlineFreeformAdditionalPropertiesRequestTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for TestInlineFreeformAdditionalPropertiesRequest
|
||||
//private TestInlineFreeformAdditionalPropertiesRequest instance;
|
||||
|
||||
public TestInlineFreeformAdditionalPropertiesRequestTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
//instance = new TestInlineFreeformAdditionalPropertiesRequest();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestInlineFreeformAdditionalPropertiesRequestInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" TestInlineFreeformAdditionalPropertiesRequest
|
||||
//Assert.IsType<TestInlineFreeformAdditionalPropertiesRequest>(instance);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'SomeProperty'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void SomePropertyTest()
|
||||
{
|
||||
// TODO unit test for the property 'SomeProperty'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -384,6 +384,29 @@ namespace UseSourceGeneration.Api
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> TestInlineAdditionalPropertiesOrDefaultAsync(Dictionary<string, string> requestBody, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object>></returns>
|
||||
Task<ApiResponse<object>> TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> TestInlineFreeformAdditionalPropertiesOrDefaultAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
@@ -715,6 +738,26 @@ namespace UseSourceGeneration.Api
|
||||
OnErrorTestInlineAdditionalProperties?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnTestInlineFreeformAdditionalProperties;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorTestInlineFreeformAdditionalProperties;
|
||||
|
||||
internal void ExecuteOnTestInlineFreeformAdditionalProperties(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestInlineFreeformAdditionalProperties?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestInlineFreeformAdditionalProperties(Exception exception)
|
||||
{
|
||||
OnErrorTestInlineFreeformAdditionalProperties?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
@@ -2946,6 +2989,148 @@ namespace UseSourceGeneration.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
{
|
||||
if (testInlineFreeformAdditionalPropertiesRequest == null)
|
||||
throw new ArgumentNullException(nameof(testInlineFreeformAdditionalPropertiesRequest));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
private void AfterTestInlineFreeformAdditionalPropertiesDefaultImplementation(ApiResponse<object> apiResponseLocalVar, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
AfterTestInlineFreeformAdditionalProperties(ref suppressDefaultLog, apiResponseLocalVar, testInlineFreeformAdditionalPropertiesRequest);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
partial void AfterTestInlineFreeformAdditionalProperties(ref bool suppressDefaultLog, ApiResponse<object> apiResponseLocalVar, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
/// </summary>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
private void OnErrorTestInlineFreeformAdditionalPropertiesDefaultImplementation(Exception exception, string pathFormat, string path, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestInlineFreeformAdditionalProperties(ref suppressDefaultLog, exception, pathFormat, path, testInlineFreeformAdditionalPropertiesRequest);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
partial void OnErrorTestInlineFreeformAdditionalProperties(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>?> TestInlineFreeformAdditionalPropertiesOrDefaultAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
return await TestInlineFreeformAdditionalPropertiesAsync(testInlineFreeformAdditionalPropertiesRequest, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
FormatTestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host;
|
||||
uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port;
|
||||
uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme;
|
||||
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/fake/inline-freeform-additionalProperties";
|
||||
|
||||
httpRequestMessageLocalVar.Content = (testInlineFreeformAdditionalPropertiesRequest as object) is System.IO.Stream stream
|
||||
? httpRequestMessageLocalVar.Content = new StreamContent(stream)
|
||||
: httpRequestMessageLocalVar.Content = new StringContent(JsonSerializer.Serialize(testInlineFreeformAdditionalPropertiesRequest, _jsonSerializerOptions));
|
||||
|
||||
httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri;
|
||||
|
||||
string[] contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
string? contentTypeLocalVar = ClientUtils.SelectHeaderContentType(contentTypes);
|
||||
|
||||
if (contentTypeLocalVar != null && httpRequestMessageLocalVar.Content != null)
|
||||
httpRequestMessageLocalVar.Content.Headers.ContentType = new MediaTypeHeaderValue(contentTypeLocalVar);
|
||||
|
||||
httpRequestMessageLocalVar.Method = HttpMethod.Post;
|
||||
|
||||
DateTime requestedAtLocalVar = DateTime.UtcNow;
|
||||
|
||||
using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false))
|
||||
{
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<object> apiResponseLocalVar = new ApiResponse<object>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/inline-freeform-additionalProperties", requestedAtLocalVar, _jsonSerializerOptions);
|
||||
|
||||
AfterTestInlineFreeformAdditionalPropertiesDefaultImplementation(apiResponseLocalVar, testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
Events.ExecuteOnTestInlineFreeformAdditionalProperties(apiResponseLocalVar);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestInlineFreeformAdditionalPropertiesDefaultImplementation(e, "/fake/inline-freeform-additionalProperties", uriBuilderLocalVar.Path, testInlineFreeformAdditionalPropertiesRequest);
|
||||
Events.ExecuteOnErrorTestInlineFreeformAdditionalProperties(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestJsonFormData(ref string param, ref string param2);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -128,6 +128,7 @@ namespace UseSourceGeneration.Client
|
||||
_jsonOptions.Converters.Add(new TagJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TestCollectionEndingWithWordListJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TestCollectionEndingWithWordListObjectJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TestInlineFreeformAdditionalPropertiesRequestJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TriangleJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TriangleInterfaceJsonConverter());
|
||||
_jsonOptions.Converters.Add(new UserJsonConverter());
|
||||
@@ -221,6 +222,7 @@ namespace UseSourceGeneration.Client
|
||||
new TagSerializationContext(),
|
||||
new TestCollectionEndingWithWordListSerializationContext(),
|
||||
new TestCollectionEndingWithWordListObjectSerializationContext(),
|
||||
new TestInlineFreeformAdditionalPropertiesRequestSerializationContext(),
|
||||
new TriangleSerializationContext(),
|
||||
new TriangleInterfaceSerializationContext(),
|
||||
new UserSerializationContext(),
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
// <auto-generated>
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIClientUtils = UseSourceGeneration.Client.ClientUtils;
|
||||
using System.Text.Json.Serialization.Metadata;
|
||||
using UseSourceGeneration.Client;
|
||||
|
||||
namespace UseSourceGeneration.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
public partial class TestInlineFreeformAdditionalPropertiesRequest : Dictionary<String, Object>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TestInlineFreeformAdditionalPropertiesRequest" /> class.
|
||||
/// </summary>
|
||||
/// <param name="someProperty">someProperty</param>
|
||||
[JsonConstructor]
|
||||
public TestInlineFreeformAdditionalPropertiesRequest(string someProperty) : base()
|
||||
{
|
||||
SomeProperty = someProperty;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets SomeProperty
|
||||
/// </summary>
|
||||
[JsonPropertyName("someProperty")]
|
||||
public string SomeProperty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public Dictionary<string, JsonElement> AdditionalProperties { get; } = new Dictionary<string, JsonElement>();
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class TestInlineFreeformAdditionalPropertiesRequest {\n");
|
||||
sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append(" SomeProperty: ").Append(SomeProperty).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
return this.BaseValidate(validationContext);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
protected IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> BaseValidate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type <see cref="TestInlineFreeformAdditionalPropertiesRequest" />
|
||||
/// </summary>
|
||||
public class TestInlineFreeformAdditionalPropertiesRequestJsonConverter : JsonConverter<TestInlineFreeformAdditionalPropertiesRequest>
|
||||
{
|
||||
/// <summary>
|
||||
/// Deserializes json to <see cref="TestInlineFreeformAdditionalPropertiesRequest" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="JsonException"></exception>
|
||||
public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
int currentDepth = utf8JsonReader.CurrentDepth;
|
||||
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
|
||||
throw new JsonException();
|
||||
|
||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||
|
||||
string? someProperty = default;
|
||||
|
||||
while (utf8JsonReader.Read())
|
||||
{
|
||||
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
|
||||
break;
|
||||
|
||||
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
|
||||
break;
|
||||
|
||||
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
|
||||
{
|
||||
string? localVarJsonPropertyName = utf8JsonReader.GetString();
|
||||
utf8JsonReader.Read();
|
||||
|
||||
switch (localVarJsonPropertyName)
|
||||
{
|
||||
case "someProperty":
|
||||
someProperty = utf8JsonReader.GetString();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (someProperty == null)
|
||||
throw new ArgumentNullException(nameof(someProperty), "Property is required for class TestInlineFreeformAdditionalPropertiesRequest.");
|
||||
|
||||
return new TestInlineFreeformAdditionalPropertiesRequest(someProperty);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serializes a <see cref="TestInlineFreeformAdditionalPropertiesRequest" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public override void Write(Utf8JsonWriter writer, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
writer.WriteStartObject();
|
||||
|
||||
WriteProperties(ref writer, testInlineFreeformAdditionalPropertiesRequest, jsonSerializerOptions);
|
||||
writer.WriteEndObject();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serializes the properties of <see cref="TestInlineFreeformAdditionalPropertiesRequest" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public void WriteProperties(ref Utf8JsonWriter writer, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
writer.WriteString("someProperty", testInlineFreeformAdditionalPropertiesRequest.SomeProperty);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The TestInlineFreeformAdditionalPropertiesRequestSerializationContext
|
||||
/// </summary>
|
||||
[JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)]
|
||||
[JsonSerializable(typeof(TestInlineFreeformAdditionalPropertiesRequest))]
|
||||
public partial class TestInlineFreeformAdditionalPropertiesRequestSerializationContext : JsonSerializerContext { }
|
||||
}
|
||||
@@ -91,6 +91,7 @@ docs/models/SpecialModelName.md
|
||||
docs/models/Tag.md
|
||||
docs/models/TestCollectionEndingWithWordList.md
|
||||
docs/models/TestCollectionEndingWithWordListObject.md
|
||||
docs/models/TestInlineFreeformAdditionalPropertiesRequest.md
|
||||
docs/models/Triangle.md
|
||||
docs/models/TriangleInterface.md
|
||||
docs/models/User.md
|
||||
@@ -217,6 +218,7 @@ src/Org.OpenAPITools/Model/SpecialModelName.cs
|
||||
src/Org.OpenAPITools/Model/Tag.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs
|
||||
src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs
|
||||
src/Org.OpenAPITools/Model/Triangle.cs
|
||||
src/Org.OpenAPITools/Model/TriangleInterface.cs
|
||||
src/Org.OpenAPITools/Model/User.cs
|
||||
|
||||
@@ -943,6 +943,23 @@ paths:
|
||||
summary: test inline additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/testInlineFreeformAdditionalProperties_request'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test inline free-form additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
operationId: testBodyWithQueryParams
|
||||
@@ -2488,6 +2505,12 @@ components:
|
||||
- param
|
||||
- param2
|
||||
type: object
|
||||
testInlineFreeformAdditionalProperties_request:
|
||||
additionalProperties: true
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
type: object
|
||||
uploadFileWithRequiredFile_request:
|
||||
properties:
|
||||
additionalMetadata:
|
||||
|
||||
@@ -17,6 +17,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters |
|
||||
| [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) |
|
||||
| [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties |
|
||||
| [**TestInlineFreeformAdditionalProperties**](FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties |
|
||||
| [**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data |
|
||||
| [**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | |
|
||||
|
||||
@@ -1205,6 +1206,91 @@ No authorization required
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
||||
|
||||
<a id="testinlinefreeformadditionalproperties"></a>
|
||||
# **TestInlineFreeformAdditionalProperties**
|
||||
> void TestInlineFreeformAdditionalProperties (TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
|
||||
test inline free-form additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestInlineFreeformAdditionalPropertiesExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var testInlineFreeformAdditionalPropertiesRequest = new TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalProperties: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestInlineFreeformAdditionalPropertiesWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalPropertiesWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.TestInlineFreeformAdditionalPropertiesRequest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**SomeProperty** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class TestInlineFreeformAdditionalPropertiesRequestTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for TestInlineFreeformAdditionalPropertiesRequest
|
||||
//private TestInlineFreeformAdditionalPropertiesRequest instance;
|
||||
|
||||
public TestInlineFreeformAdditionalPropertiesRequestTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
//instance = new TestInlineFreeformAdditionalPropertiesRequest();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestInlineFreeformAdditionalPropertiesRequestInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" TestInlineFreeformAdditionalPropertiesRequest
|
||||
//Assert.IsType<TestInlineFreeformAdditionalPropertiesRequest>(instance);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'SomeProperty'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void SomePropertyTest()
|
||||
{
|
||||
// TODO unit test for the property 'SomeProperty'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -384,6 +384,29 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> TestInlineAdditionalPropertiesOrDefaultAsync(Dictionary<string, string> requestBody, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object>></returns>
|
||||
Task<ApiResponse<object>> TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> TestInlineFreeformAdditionalPropertiesOrDefaultAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
@@ -715,6 +738,26 @@ namespace Org.OpenAPITools.Api
|
||||
OnErrorTestInlineAdditionalProperties?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnTestInlineFreeformAdditionalProperties;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorTestInlineFreeformAdditionalProperties;
|
||||
|
||||
internal void ExecuteOnTestInlineFreeformAdditionalProperties(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestInlineFreeformAdditionalProperties?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestInlineFreeformAdditionalProperties(Exception exception)
|
||||
{
|
||||
OnErrorTestInlineFreeformAdditionalProperties?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
@@ -2946,6 +2989,148 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
{
|
||||
if (testInlineFreeformAdditionalPropertiesRequest == null)
|
||||
throw new ArgumentNullException(nameof(testInlineFreeformAdditionalPropertiesRequest));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
private void AfterTestInlineFreeformAdditionalPropertiesDefaultImplementation(ApiResponse<object> apiResponseLocalVar, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
AfterTestInlineFreeformAdditionalProperties(ref suppressDefaultLog, apiResponseLocalVar, testInlineFreeformAdditionalPropertiesRequest);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
partial void AfterTestInlineFreeformAdditionalProperties(ref bool suppressDefaultLog, ApiResponse<object> apiResponseLocalVar, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
/// </summary>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
private void OnErrorTestInlineFreeformAdditionalPropertiesDefaultImplementation(Exception exception, string pathFormat, string path, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestInlineFreeformAdditionalProperties(ref suppressDefaultLog, exception, pathFormat, path, testInlineFreeformAdditionalPropertiesRequest);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
partial void OnErrorTestInlineFreeformAdditionalProperties(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>?> TestInlineFreeformAdditionalPropertiesOrDefaultAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
return await TestInlineFreeformAdditionalPropertiesAsync(testInlineFreeformAdditionalPropertiesRequest, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
FormatTestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host;
|
||||
uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port;
|
||||
uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme;
|
||||
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/fake/inline-freeform-additionalProperties";
|
||||
|
||||
httpRequestMessageLocalVar.Content = (testInlineFreeformAdditionalPropertiesRequest as object) is System.IO.Stream stream
|
||||
? httpRequestMessageLocalVar.Content = new StreamContent(stream)
|
||||
: httpRequestMessageLocalVar.Content = new StringContent(JsonSerializer.Serialize(testInlineFreeformAdditionalPropertiesRequest, _jsonSerializerOptions));
|
||||
|
||||
httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri;
|
||||
|
||||
string[] contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
string? contentTypeLocalVar = ClientUtils.SelectHeaderContentType(contentTypes);
|
||||
|
||||
if (contentTypeLocalVar != null && httpRequestMessageLocalVar.Content != null)
|
||||
httpRequestMessageLocalVar.Content.Headers.ContentType = new MediaTypeHeaderValue(contentTypeLocalVar);
|
||||
|
||||
httpRequestMessageLocalVar.Method = HttpMethod.Post;
|
||||
|
||||
DateTime requestedAtLocalVar = DateTime.UtcNow;
|
||||
|
||||
using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false))
|
||||
{
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<object> apiResponseLocalVar = new ApiResponse<object>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/inline-freeform-additionalProperties", requestedAtLocalVar, _jsonSerializerOptions);
|
||||
|
||||
AfterTestInlineFreeformAdditionalPropertiesDefaultImplementation(apiResponseLocalVar, testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
Events.ExecuteOnTestInlineFreeformAdditionalProperties(apiResponseLocalVar);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestInlineFreeformAdditionalPropertiesDefaultImplementation(e, "/fake/inline-freeform-additionalProperties", uriBuilderLocalVar.Path, testInlineFreeformAdditionalPropertiesRequest);
|
||||
Events.ExecuteOnErrorTestInlineFreeformAdditionalProperties(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestJsonFormData(ref string param, ref string param2);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -128,6 +128,7 @@ namespace Org.OpenAPITools.Client
|
||||
_jsonOptions.Converters.Add(new TagJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TestCollectionEndingWithWordListJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TestCollectionEndingWithWordListObjectJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TestInlineFreeformAdditionalPropertiesRequestJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TriangleJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TriangleInterfaceJsonConverter());
|
||||
_jsonOptions.Converters.Add(new UserJsonConverter());
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
// <auto-generated>
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
public partial class TestInlineFreeformAdditionalPropertiesRequest : Dictionary<String, Object>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TestInlineFreeformAdditionalPropertiesRequest" /> class.
|
||||
/// </summary>
|
||||
/// <param name="someProperty">someProperty</param>
|
||||
[JsonConstructor]
|
||||
public TestInlineFreeformAdditionalPropertiesRequest(string someProperty) : base()
|
||||
{
|
||||
SomeProperty = someProperty;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets SomeProperty
|
||||
/// </summary>
|
||||
[JsonPropertyName("someProperty")]
|
||||
public string SomeProperty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public Dictionary<string, JsonElement> AdditionalProperties { get; } = new Dictionary<string, JsonElement>();
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class TestInlineFreeformAdditionalPropertiesRequest {\n");
|
||||
sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append(" SomeProperty: ").Append(SomeProperty).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
return this.BaseValidate(validationContext);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
protected IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> BaseValidate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type <see cref="TestInlineFreeformAdditionalPropertiesRequest" />
|
||||
/// </summary>
|
||||
public class TestInlineFreeformAdditionalPropertiesRequestJsonConverter : JsonConverter<TestInlineFreeformAdditionalPropertiesRequest>
|
||||
{
|
||||
/// <summary>
|
||||
/// Deserializes json to <see cref="TestInlineFreeformAdditionalPropertiesRequest" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="JsonException"></exception>
|
||||
public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
int currentDepth = utf8JsonReader.CurrentDepth;
|
||||
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
|
||||
throw new JsonException();
|
||||
|
||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||
|
||||
string? someProperty = default;
|
||||
|
||||
while (utf8JsonReader.Read())
|
||||
{
|
||||
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
|
||||
break;
|
||||
|
||||
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
|
||||
break;
|
||||
|
||||
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
|
||||
{
|
||||
string? localVarJsonPropertyName = utf8JsonReader.GetString();
|
||||
utf8JsonReader.Read();
|
||||
|
||||
switch (localVarJsonPropertyName)
|
||||
{
|
||||
case "someProperty":
|
||||
someProperty = utf8JsonReader.GetString();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (someProperty == null)
|
||||
throw new ArgumentNullException(nameof(someProperty), "Property is required for class TestInlineFreeformAdditionalPropertiesRequest.");
|
||||
|
||||
return new TestInlineFreeformAdditionalPropertiesRequest(someProperty);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serializes a <see cref="TestInlineFreeformAdditionalPropertiesRequest" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public override void Write(Utf8JsonWriter writer, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
writer.WriteStartObject();
|
||||
|
||||
WriteProperties(ref writer, testInlineFreeformAdditionalPropertiesRequest, jsonSerializerOptions);
|
||||
writer.WriteEndObject();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serializes the properties of <see cref="TestInlineFreeformAdditionalPropertiesRequest" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public void WriteProperties(ref Utf8JsonWriter writer, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
writer.WriteString("someProperty", testInlineFreeformAdditionalPropertiesRequest.SomeProperty);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -91,6 +91,7 @@ docs/models/SpecialModelName.md
|
||||
docs/models/Tag.md
|
||||
docs/models/TestCollectionEndingWithWordList.md
|
||||
docs/models/TestCollectionEndingWithWordListObject.md
|
||||
docs/models/TestInlineFreeformAdditionalPropertiesRequest.md
|
||||
docs/models/Triangle.md
|
||||
docs/models/TriangleInterface.md
|
||||
docs/models/User.md
|
||||
@@ -217,6 +218,7 @@ src/Org.OpenAPITools/Model/SpecialModelName.cs
|
||||
src/Org.OpenAPITools/Model/Tag.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs
|
||||
src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs
|
||||
src/Org.OpenAPITools/Model/Triangle.cs
|
||||
src/Org.OpenAPITools/Model/TriangleInterface.cs
|
||||
src/Org.OpenAPITools/Model/User.cs
|
||||
|
||||
@@ -943,6 +943,23 @@ paths:
|
||||
summary: test inline additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/testInlineFreeformAdditionalProperties_request'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test inline free-form additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
operationId: testBodyWithQueryParams
|
||||
@@ -2488,6 +2505,12 @@ components:
|
||||
- param
|
||||
- param2
|
||||
type: object
|
||||
testInlineFreeformAdditionalProperties_request:
|
||||
additionalProperties: true
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
type: object
|
||||
uploadFileWithRequiredFile_request:
|
||||
properties:
|
||||
additionalMetadata:
|
||||
|
||||
@@ -17,6 +17,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters |
|
||||
| [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) |
|
||||
| [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties |
|
||||
| [**TestInlineFreeformAdditionalProperties**](FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties |
|
||||
| [**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data |
|
||||
| [**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | |
|
||||
|
||||
@@ -1205,6 +1206,91 @@ No authorization required
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
||||
|
||||
<a id="testinlinefreeformadditionalproperties"></a>
|
||||
# **TestInlineFreeformAdditionalProperties**
|
||||
> void TestInlineFreeformAdditionalProperties (TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
|
||||
test inline free-form additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestInlineFreeformAdditionalPropertiesExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var testInlineFreeformAdditionalPropertiesRequest = new TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalProperties: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestInlineFreeformAdditionalPropertiesWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalPropertiesWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.TestInlineFreeformAdditionalPropertiesRequest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**SomeProperty** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class TestInlineFreeformAdditionalPropertiesRequestTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for TestInlineFreeformAdditionalPropertiesRequest
|
||||
//private TestInlineFreeformAdditionalPropertiesRequest instance;
|
||||
|
||||
public TestInlineFreeformAdditionalPropertiesRequestTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
//instance = new TestInlineFreeformAdditionalPropertiesRequest();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestInlineFreeformAdditionalPropertiesRequestInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" TestInlineFreeformAdditionalPropertiesRequest
|
||||
//Assert.IsType<TestInlineFreeformAdditionalPropertiesRequest>(instance);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'SomeProperty'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void SomePropertyTest()
|
||||
{
|
||||
// TODO unit test for the property 'SomeProperty'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -382,6 +382,29 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>Task<ApiResponse>object>></returns>
|
||||
Task<ApiResponse<object>> TestInlineAdditionalPropertiesOrDefaultAsync(Dictionary<string, string> requestBody, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object>></returns>
|
||||
Task<ApiResponse<object>> TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>object>></returns>
|
||||
Task<ApiResponse<object>> TestInlineFreeformAdditionalPropertiesOrDefaultAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
@@ -713,6 +736,26 @@ namespace Org.OpenAPITools.Api
|
||||
OnErrorTestInlineAdditionalProperties?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnTestInlineFreeformAdditionalProperties;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestInlineFreeformAdditionalProperties;
|
||||
|
||||
internal void ExecuteOnTestInlineFreeformAdditionalProperties(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestInlineFreeformAdditionalProperties?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestInlineFreeformAdditionalProperties(Exception exception)
|
||||
{
|
||||
OnErrorTestInlineFreeformAdditionalProperties?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
@@ -2944,6 +2987,148 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
{
|
||||
if (testInlineFreeformAdditionalPropertiesRequest == null)
|
||||
throw new ArgumentNullException(nameof(testInlineFreeformAdditionalPropertiesRequest));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
private void AfterTestInlineFreeformAdditionalPropertiesDefaultImplementation(ApiResponse<object> apiResponseLocalVar, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
AfterTestInlineFreeformAdditionalProperties(ref suppressDefaultLog, apiResponseLocalVar, testInlineFreeformAdditionalPropertiesRequest);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
partial void AfterTestInlineFreeformAdditionalProperties(ref bool suppressDefaultLog, ApiResponse<object> apiResponseLocalVar, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
/// </summary>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
private void OnErrorTestInlineFreeformAdditionalPropertiesDefaultImplementation(Exception exception, string pathFormat, string path, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestInlineFreeformAdditionalProperties(ref suppressDefaultLog, exception, pathFormat, path, testInlineFreeformAdditionalPropertiesRequest);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
partial void OnErrorTestInlineFreeformAdditionalProperties(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> TestInlineFreeformAdditionalPropertiesOrDefaultAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
return await TestInlineFreeformAdditionalPropertiesAsync(testInlineFreeformAdditionalPropertiesRequest, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
FormatTestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
uriBuilderLocalVar.Host = HttpClient.BaseAddress.Host;
|
||||
uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port;
|
||||
uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme;
|
||||
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/fake/inline-freeform-additionalProperties";
|
||||
|
||||
httpRequestMessageLocalVar.Content = (testInlineFreeformAdditionalPropertiesRequest as object) is System.IO.Stream stream
|
||||
? httpRequestMessageLocalVar.Content = new StreamContent(stream)
|
||||
: httpRequestMessageLocalVar.Content = new StringContent(JsonSerializer.Serialize(testInlineFreeformAdditionalPropertiesRequest, _jsonSerializerOptions));
|
||||
|
||||
httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri;
|
||||
|
||||
string[] contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
string contentTypeLocalVar = ClientUtils.SelectHeaderContentType(contentTypes);
|
||||
|
||||
if (contentTypeLocalVar != null && httpRequestMessageLocalVar.Content != null)
|
||||
httpRequestMessageLocalVar.Content.Headers.ContentType = new MediaTypeHeaderValue(contentTypeLocalVar);
|
||||
|
||||
httpRequestMessageLocalVar.Method = HttpMethod.Post;
|
||||
|
||||
DateTime requestedAtLocalVar = DateTime.UtcNow;
|
||||
|
||||
using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false))
|
||||
{
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<object> apiResponseLocalVar = new ApiResponse<object>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/inline-freeform-additionalProperties", requestedAtLocalVar, _jsonSerializerOptions);
|
||||
|
||||
AfterTestInlineFreeformAdditionalPropertiesDefaultImplementation(apiResponseLocalVar, testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
Events.ExecuteOnTestInlineFreeformAdditionalProperties(apiResponseLocalVar);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestInlineFreeformAdditionalPropertiesDefaultImplementation(e, "/fake/inline-freeform-additionalProperties", uriBuilderLocalVar.Path, testInlineFreeformAdditionalPropertiesRequest);
|
||||
Events.ExecuteOnErrorTestInlineFreeformAdditionalProperties(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestJsonFormData(ref string param, ref string param2);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -126,6 +126,7 @@ namespace Org.OpenAPITools.Client
|
||||
_jsonOptions.Converters.Add(new TagJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TestCollectionEndingWithWordListJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TestCollectionEndingWithWordListObjectJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TestInlineFreeformAdditionalPropertiesRequestJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TriangleJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TriangleInterfaceJsonConverter());
|
||||
_jsonOptions.Converters.Add(new UserJsonConverter());
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
// <auto-generated>
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
public partial class TestInlineFreeformAdditionalPropertiesRequest : Dictionary<String, Object>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TestInlineFreeformAdditionalPropertiesRequest" /> class.
|
||||
/// </summary>
|
||||
/// <param name="someProperty">someProperty</param>
|
||||
[JsonConstructor]
|
||||
public TestInlineFreeformAdditionalPropertiesRequest(string someProperty) : base()
|
||||
{
|
||||
SomeProperty = someProperty;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets SomeProperty
|
||||
/// </summary>
|
||||
[JsonPropertyName("someProperty")]
|
||||
public string SomeProperty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public Dictionary<string, JsonElement> AdditionalProperties { get; } = new Dictionary<string, JsonElement>();
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class TestInlineFreeformAdditionalPropertiesRequest {\n");
|
||||
sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append(" SomeProperty: ").Append(SomeProperty).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
return this.BaseValidate(validationContext);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
protected IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> BaseValidate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type <see cref="TestInlineFreeformAdditionalPropertiesRequest" />
|
||||
/// </summary>
|
||||
public class TestInlineFreeformAdditionalPropertiesRequestJsonConverter : JsonConverter<TestInlineFreeformAdditionalPropertiesRequest>
|
||||
{
|
||||
/// <summary>
|
||||
/// Deserializes json to <see cref="TestInlineFreeformAdditionalPropertiesRequest" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="JsonException"></exception>
|
||||
public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
int currentDepth = utf8JsonReader.CurrentDepth;
|
||||
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
|
||||
throw new JsonException();
|
||||
|
||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||
|
||||
string someProperty = default;
|
||||
|
||||
while (utf8JsonReader.Read())
|
||||
{
|
||||
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
|
||||
break;
|
||||
|
||||
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
|
||||
break;
|
||||
|
||||
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
|
||||
{
|
||||
string localVarJsonPropertyName = utf8JsonReader.GetString();
|
||||
utf8JsonReader.Read();
|
||||
|
||||
switch (localVarJsonPropertyName)
|
||||
{
|
||||
case "someProperty":
|
||||
someProperty = utf8JsonReader.GetString();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (someProperty == null)
|
||||
throw new ArgumentNullException(nameof(someProperty), "Property is required for class TestInlineFreeformAdditionalPropertiesRequest.");
|
||||
|
||||
return new TestInlineFreeformAdditionalPropertiesRequest(someProperty);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serializes a <see cref="TestInlineFreeformAdditionalPropertiesRequest" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public override void Write(Utf8JsonWriter writer, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
writer.WriteStartObject();
|
||||
|
||||
WriteProperties(ref writer, testInlineFreeformAdditionalPropertiesRequest, jsonSerializerOptions);
|
||||
writer.WriteEndObject();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serializes the properties of <see cref="TestInlineFreeformAdditionalPropertiesRequest" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public void WriteProperties(ref Utf8JsonWriter writer, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
writer.WriteString("someProperty", testInlineFreeformAdditionalPropertiesRequest.SomeProperty);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -91,6 +91,7 @@ docs/models/SpecialModelName.md
|
||||
docs/models/Tag.md
|
||||
docs/models/TestCollectionEndingWithWordList.md
|
||||
docs/models/TestCollectionEndingWithWordListObject.md
|
||||
docs/models/TestInlineFreeformAdditionalPropertiesRequest.md
|
||||
docs/models/Triangle.md
|
||||
docs/models/TriangleInterface.md
|
||||
docs/models/User.md
|
||||
@@ -217,6 +218,7 @@ src/Org.OpenAPITools/Model/SpecialModelName.cs
|
||||
src/Org.OpenAPITools/Model/Tag.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs
|
||||
src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs
|
||||
src/Org.OpenAPITools/Model/Triangle.cs
|
||||
src/Org.OpenAPITools/Model/TriangleInterface.cs
|
||||
src/Org.OpenAPITools/Model/User.cs
|
||||
|
||||
@@ -943,6 +943,23 @@ paths:
|
||||
summary: test inline additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/testInlineFreeformAdditionalProperties_request'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test inline free-form additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
operationId: testBodyWithQueryParams
|
||||
@@ -2488,6 +2505,12 @@ components:
|
||||
- param
|
||||
- param2
|
||||
type: object
|
||||
testInlineFreeformAdditionalProperties_request:
|
||||
additionalProperties: true
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
type: object
|
||||
uploadFileWithRequiredFile_request:
|
||||
properties:
|
||||
additionalMetadata:
|
||||
|
||||
@@ -17,6 +17,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters |
|
||||
| [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) |
|
||||
| [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties |
|
||||
| [**TestInlineFreeformAdditionalProperties**](FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties |
|
||||
| [**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data |
|
||||
| [**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | |
|
||||
|
||||
@@ -1205,6 +1206,91 @@ No authorization required
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
||||
|
||||
<a id="testinlinefreeformadditionalproperties"></a>
|
||||
# **TestInlineFreeformAdditionalProperties**
|
||||
> void TestInlineFreeformAdditionalProperties (TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
|
||||
test inline free-form additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestInlineFreeformAdditionalPropertiesExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var testInlineFreeformAdditionalPropertiesRequest = new TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalProperties: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestInlineFreeformAdditionalPropertiesWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalPropertiesWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.TestInlineFreeformAdditionalPropertiesRequest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**SomeProperty** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class TestInlineFreeformAdditionalPropertiesRequestTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for TestInlineFreeformAdditionalPropertiesRequest
|
||||
//private TestInlineFreeformAdditionalPropertiesRequest instance;
|
||||
|
||||
public TestInlineFreeformAdditionalPropertiesRequestTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
//instance = new TestInlineFreeformAdditionalPropertiesRequest();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestInlineFreeformAdditionalPropertiesRequestInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" TestInlineFreeformAdditionalPropertiesRequest
|
||||
//Assert.IsType<TestInlineFreeformAdditionalPropertiesRequest>(instance);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'SomeProperty'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void SomePropertyTest()
|
||||
{
|
||||
// TODO unit test for the property 'SomeProperty'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -382,6 +382,29 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>Task<ApiResponse>object>></returns>
|
||||
Task<ApiResponse<object>> TestInlineAdditionalPropertiesOrDefaultAsync(Dictionary<string, string> requestBody, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object>></returns>
|
||||
Task<ApiResponse<object>> TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>object>></returns>
|
||||
Task<ApiResponse<object>> TestInlineFreeformAdditionalPropertiesOrDefaultAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
@@ -713,6 +736,26 @@ namespace Org.OpenAPITools.Api
|
||||
OnErrorTestInlineAdditionalProperties?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnTestInlineFreeformAdditionalProperties;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestInlineFreeformAdditionalProperties;
|
||||
|
||||
internal void ExecuteOnTestInlineFreeformAdditionalProperties(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestInlineFreeformAdditionalProperties?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestInlineFreeformAdditionalProperties(Exception exception)
|
||||
{
|
||||
OnErrorTestInlineFreeformAdditionalProperties?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
@@ -2936,6 +2979,148 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
{
|
||||
if (testInlineFreeformAdditionalPropertiesRequest == null)
|
||||
throw new ArgumentNullException(nameof(testInlineFreeformAdditionalPropertiesRequest));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
private void AfterTestInlineFreeformAdditionalPropertiesDefaultImplementation(ApiResponse<object> apiResponseLocalVar, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
AfterTestInlineFreeformAdditionalProperties(ref suppressDefaultLog, apiResponseLocalVar, testInlineFreeformAdditionalPropertiesRequest);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
partial void AfterTestInlineFreeformAdditionalProperties(ref bool suppressDefaultLog, ApiResponse<object> apiResponseLocalVar, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
/// </summary>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
private void OnErrorTestInlineFreeformAdditionalPropertiesDefaultImplementation(Exception exception, string pathFormat, string path, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestInlineFreeformAdditionalProperties(ref suppressDefaultLog, exception, pathFormat, path, testInlineFreeformAdditionalPropertiesRequest);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
partial void OnErrorTestInlineFreeformAdditionalProperties(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> TestInlineFreeformAdditionalPropertiesOrDefaultAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
return await TestInlineFreeformAdditionalPropertiesAsync(testInlineFreeformAdditionalPropertiesRequest, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
FormatTestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
uriBuilderLocalVar.Host = HttpClient.BaseAddress.Host;
|
||||
uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port;
|
||||
uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme;
|
||||
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/fake/inline-freeform-additionalProperties";
|
||||
|
||||
httpRequestMessageLocalVar.Content = (testInlineFreeformAdditionalPropertiesRequest as object) is System.IO.Stream stream
|
||||
? httpRequestMessageLocalVar.Content = new StreamContent(stream)
|
||||
: httpRequestMessageLocalVar.Content = new StringContent(JsonSerializer.Serialize(testInlineFreeformAdditionalPropertiesRequest, _jsonSerializerOptions));
|
||||
|
||||
httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri;
|
||||
|
||||
string[] contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
string contentTypeLocalVar = ClientUtils.SelectHeaderContentType(contentTypes);
|
||||
|
||||
if (contentTypeLocalVar != null && httpRequestMessageLocalVar.Content != null)
|
||||
httpRequestMessageLocalVar.Content.Headers.ContentType = new MediaTypeHeaderValue(contentTypeLocalVar);
|
||||
|
||||
httpRequestMessageLocalVar.Method = new HttpMethod("POST");
|
||||
|
||||
DateTime requestedAtLocalVar = DateTime.UtcNow;
|
||||
|
||||
using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false))
|
||||
{
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
|
||||
ApiResponse<object> apiResponseLocalVar = new ApiResponse<object>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/inline-freeform-additionalProperties", requestedAtLocalVar, _jsonSerializerOptions);
|
||||
|
||||
AfterTestInlineFreeformAdditionalPropertiesDefaultImplementation(apiResponseLocalVar, testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
Events.ExecuteOnTestInlineFreeformAdditionalProperties(apiResponseLocalVar);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestInlineFreeformAdditionalPropertiesDefaultImplementation(e, "/fake/inline-freeform-additionalProperties", uriBuilderLocalVar.Path, testInlineFreeformAdditionalPropertiesRequest);
|
||||
Events.ExecuteOnErrorTestInlineFreeformAdditionalProperties(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestJsonFormData(ref string param, ref string param2);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -126,6 +126,7 @@ namespace Org.OpenAPITools.Client
|
||||
_jsonOptions.Converters.Add(new TagJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TestCollectionEndingWithWordListJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TestCollectionEndingWithWordListObjectJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TestInlineFreeformAdditionalPropertiesRequestJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TriangleJsonConverter());
|
||||
_jsonOptions.Converters.Add(new TriangleInterfaceJsonConverter());
|
||||
_jsonOptions.Converters.Add(new UserJsonConverter());
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
// <auto-generated>
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
public partial class TestInlineFreeformAdditionalPropertiesRequest : Dictionary<String, Object>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TestInlineFreeformAdditionalPropertiesRequest" /> class.
|
||||
/// </summary>
|
||||
/// <param name="someProperty">someProperty</param>
|
||||
[JsonConstructor]
|
||||
public TestInlineFreeformAdditionalPropertiesRequest(string someProperty) : base()
|
||||
{
|
||||
SomeProperty = someProperty;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets SomeProperty
|
||||
/// </summary>
|
||||
[JsonPropertyName("someProperty")]
|
||||
public string SomeProperty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public Dictionary<string, JsonElement> AdditionalProperties { get; } = new Dictionary<string, JsonElement>();
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class TestInlineFreeformAdditionalPropertiesRequest {\n");
|
||||
sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append(" SomeProperty: ").Append(SomeProperty).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
return this.BaseValidate(validationContext);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
protected IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> BaseValidate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type <see cref="TestInlineFreeformAdditionalPropertiesRequest" />
|
||||
/// </summary>
|
||||
public class TestInlineFreeformAdditionalPropertiesRequestJsonConverter : JsonConverter<TestInlineFreeformAdditionalPropertiesRequest>
|
||||
{
|
||||
/// <summary>
|
||||
/// Deserializes json to <see cref="TestInlineFreeformAdditionalPropertiesRequest" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="JsonException"></exception>
|
||||
public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
int currentDepth = utf8JsonReader.CurrentDepth;
|
||||
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
|
||||
throw new JsonException();
|
||||
|
||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||
|
||||
string someProperty = default;
|
||||
|
||||
while (utf8JsonReader.Read())
|
||||
{
|
||||
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
|
||||
break;
|
||||
|
||||
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
|
||||
break;
|
||||
|
||||
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
|
||||
{
|
||||
string localVarJsonPropertyName = utf8JsonReader.GetString();
|
||||
utf8JsonReader.Read();
|
||||
|
||||
switch (localVarJsonPropertyName)
|
||||
{
|
||||
case "someProperty":
|
||||
someProperty = utf8JsonReader.GetString();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (someProperty == null)
|
||||
throw new ArgumentNullException(nameof(someProperty), "Property is required for class TestInlineFreeformAdditionalPropertiesRequest.");
|
||||
|
||||
return new TestInlineFreeformAdditionalPropertiesRequest(someProperty);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serializes a <see cref="TestInlineFreeformAdditionalPropertiesRequest" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public override void Write(Utf8JsonWriter writer, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
writer.WriteStartObject();
|
||||
|
||||
WriteProperties(ref writer, testInlineFreeformAdditionalPropertiesRequest, jsonSerializerOptions);
|
||||
writer.WriteEndObject();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serializes the properties of <see cref="TestInlineFreeformAdditionalPropertiesRequest" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public void WriteProperties(ref Utf8JsonWriter writer, TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
writer.WriteString("someProperty", testInlineFreeformAdditionalPropertiesRequest.SomeProperty);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,6 +90,7 @@ docs/StoreApi.md
|
||||
docs/Tag.md
|
||||
docs/TestCollectionEndingWithWordList.md
|
||||
docs/TestCollectionEndingWithWordListObject.md
|
||||
docs/TestInlineFreeformAdditionalPropertiesRequest.md
|
||||
docs/Triangle.md
|
||||
docs/TriangleInterface.md
|
||||
docs/User.md
|
||||
@@ -206,6 +207,7 @@ src/Org.OpenAPITools/Model/SpecialModelName.cs
|
||||
src/Org.OpenAPITools/Model/Tag.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs
|
||||
src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs
|
||||
src/Org.OpenAPITools/Model/Triangle.cs
|
||||
src/Org.OpenAPITools/Model/TriangleInterface.cs
|
||||
src/Org.OpenAPITools/Model/User.cs
|
||||
|
||||
@@ -147,6 +147,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||
*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
*FakeApi* | [**TestInlineFreeformAdditionalProperties**](docs/FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties
|
||||
*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters |
|
||||
*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
@@ -257,6 +258,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.Tag](docs/Tag.md)
|
||||
- [Model.TestCollectionEndingWithWordList](docs/TestCollectionEndingWithWordList.md)
|
||||
- [Model.TestCollectionEndingWithWordListObject](docs/TestCollectionEndingWithWordListObject.md)
|
||||
- [Model.TestInlineFreeformAdditionalPropertiesRequest](docs/TestInlineFreeformAdditionalPropertiesRequest.md)
|
||||
- [Model.Triangle](docs/Triangle.md)
|
||||
- [Model.TriangleInterface](docs/TriangleInterface.md)
|
||||
- [Model.User](docs/User.md)
|
||||
|
||||
@@ -943,6 +943,23 @@ paths:
|
||||
summary: test inline additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/testInlineFreeformAdditionalProperties_request'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test inline free-form additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
operationId: testBodyWithQueryParams
|
||||
@@ -2488,6 +2505,12 @@ components:
|
||||
- param
|
||||
- param2
|
||||
type: object
|
||||
testInlineFreeformAdditionalProperties_request:
|
||||
additionalProperties: true
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
type: object
|
||||
uploadFileWithRequiredFile_request:
|
||||
properties:
|
||||
additionalMetadata:
|
||||
|
||||
@@ -17,6 +17,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters |
|
||||
| [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) |
|
||||
| [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties |
|
||||
| [**TestInlineFreeformAdditionalProperties**](FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties |
|
||||
| [**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data |
|
||||
| [**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | |
|
||||
|
||||
@@ -1257,6 +1258,95 @@ No authorization required
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a id="testinlinefreeformadditionalproperties"></a>
|
||||
# **TestInlineFreeformAdditionalProperties**
|
||||
> void TestInlineFreeformAdditionalProperties (TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
|
||||
test inline free-form additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Net.Http;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestInlineFreeformAdditionalPropertiesExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
|
||||
HttpClient httpClient = new HttpClient();
|
||||
HttpClientHandler httpClientHandler = new HttpClientHandler();
|
||||
var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
|
||||
var testInlineFreeformAdditionalPropertiesRequest = new TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalProperties: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestInlineFreeformAdditionalPropertiesWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalPropertiesWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.TestInlineFreeformAdditionalPropertiesRequest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**SomeProperty** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class TestInlineFreeformAdditionalPropertiesRequestTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for TestInlineFreeformAdditionalPropertiesRequest
|
||||
//private TestInlineFreeformAdditionalPropertiesRequest instance;
|
||||
|
||||
public TestInlineFreeformAdditionalPropertiesRequestTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
//instance = new TestInlineFreeformAdditionalPropertiesRequest();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestInlineFreeformAdditionalPropertiesRequestInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" TestInlineFreeformAdditionalPropertiesRequest
|
||||
//Assert.IsType<TestInlineFreeformAdditionalPropertiesRequest>(instance);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'SomeProperty'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void SomePropertyTest()
|
||||
{
|
||||
// TODO unit test for the property 'SomeProperty'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -339,6 +339,24 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestInlineAdditionalPropertiesWithHttpInfo(Dictionary<string, string> requestBody);
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <returns></returns>
|
||||
void TestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest);
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
@@ -754,6 +772,29 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary<string, string> requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestInlineFreeformAdditionalPropertiesWithHttpInfoAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@@ -2773,6 +2814,119 @@ namespace Org.OpenAPITools.Api
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <returns></returns>
|
||||
public void TestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
{
|
||||
TestInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<Object> TestInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
{
|
||||
// verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set
|
||||
if (testInlineFreeformAdditionalPropertiesRequest == null)
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties");
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
|
||||
localVarRequestOptions.Data = testInlineFreeformAdditionalPropertiesRequest;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Post<Object>("/fake/inline-freeform-additionalProperties", localVarRequestOptions, this.Configuration);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestInlineFreeformAdditionalProperties", localVarResponse);
|
||||
if (_exception != null) throw _exception;
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
await TestInlineFreeformAdditionalPropertiesWithHttpInfoAsync(testInlineFreeformAdditionalPropertiesRequest, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> TestInlineFreeformAdditionalPropertiesWithHttpInfoAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
// verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set
|
||||
if (testInlineFreeformAdditionalPropertiesRequest == null)
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties");
|
||||
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
|
||||
localVarRequestOptions.Data = testInlineFreeformAdditionalPropertiesRequest;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
|
||||
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/fake/inline-freeform-additionalProperties", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestInlineFreeformAdditionalProperties", localVarResponse);
|
||||
if (_exception != null) throw _exception;
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using FileParameter = Org.OpenAPITools.Client.FileParameter;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
[DataContract(Name = "testInlineFreeformAdditionalProperties_request")]
|
||||
public partial class TestInlineFreeformAdditionalPropertiesRequest : Dictionary<String, Object>, IEquatable<TestInlineFreeformAdditionalPropertiesRequest>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TestInlineFreeformAdditionalPropertiesRequest" /> class.
|
||||
/// </summary>
|
||||
/// <param name="someProperty">someProperty.</param>
|
||||
public TestInlineFreeformAdditionalPropertiesRequest(string someProperty = default(string)) : base()
|
||||
{
|
||||
this.SomeProperty = someProperty;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets SomeProperty
|
||||
/// </summary>
|
||||
[DataMember(Name = "someProperty", EmitDefaultValue = false)]
|
||||
public string SomeProperty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, object> AdditionalProperties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class TestInlineFreeformAdditionalPropertiesRequest {\n");
|
||||
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append(" SomeProperty: ").Append(SomeProperty).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input as TestInlineFreeformAdditionalPropertiesRequest).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if TestInlineFreeformAdditionalPropertiesRequest instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of TestInlineFreeformAdditionalPropertiesRequest to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(TestInlineFreeformAdditionalPropertiesRequest input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = base.GetHashCode();
|
||||
if (this.SomeProperty != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.SomeProperty.GetHashCode();
|
||||
}
|
||||
if (this.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
return this.BaseValidate(validationContext);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
protected IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> BaseValidate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -90,6 +90,7 @@ docs/StoreApi.md
|
||||
docs/Tag.md
|
||||
docs/TestCollectionEndingWithWordList.md
|
||||
docs/TestCollectionEndingWithWordListObject.md
|
||||
docs/TestInlineFreeformAdditionalPropertiesRequest.md
|
||||
docs/Triangle.md
|
||||
docs/TriangleInterface.md
|
||||
docs/User.md
|
||||
@@ -209,6 +210,7 @@ src/Org.OpenAPITools/Model/SpecialModelName.cs
|
||||
src/Org.OpenAPITools/Model/Tag.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs
|
||||
src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs
|
||||
src/Org.OpenAPITools/Model/Triangle.cs
|
||||
src/Org.OpenAPITools/Model/TriangleInterface.cs
|
||||
src/Org.OpenAPITools/Model/User.cs
|
||||
|
||||
@@ -134,6 +134,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||
*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
*FakeApi* | [**TestInlineFreeformAdditionalProperties**](docs/FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties
|
||||
*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters |
|
||||
*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
@@ -244,6 +245,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.Tag](docs/Tag.md)
|
||||
- [Model.TestCollectionEndingWithWordList](docs/TestCollectionEndingWithWordList.md)
|
||||
- [Model.TestCollectionEndingWithWordListObject](docs/TestCollectionEndingWithWordListObject.md)
|
||||
- [Model.TestInlineFreeformAdditionalPropertiesRequest](docs/TestInlineFreeformAdditionalPropertiesRequest.md)
|
||||
- [Model.Triangle](docs/Triangle.md)
|
||||
- [Model.TriangleInterface](docs/TriangleInterface.md)
|
||||
- [Model.User](docs/User.md)
|
||||
|
||||
@@ -943,6 +943,23 @@ paths:
|
||||
summary: test inline additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/testInlineFreeformAdditionalProperties_request'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test inline free-form additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
operationId: testBodyWithQueryParams
|
||||
@@ -2488,6 +2505,12 @@ components:
|
||||
- param
|
||||
- param2
|
||||
type: object
|
||||
testInlineFreeformAdditionalProperties_request:
|
||||
additionalProperties: true
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
type: object
|
||||
uploadFileWithRequiredFile_request:
|
||||
properties:
|
||||
additionalMetadata:
|
||||
|
||||
@@ -17,6 +17,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters |
|
||||
| [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) |
|
||||
| [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties |
|
||||
| [**TestInlineFreeformAdditionalProperties**](FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties |
|
||||
| [**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data |
|
||||
| [**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | |
|
||||
|
||||
@@ -1205,6 +1206,91 @@ No authorization required
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a id="testinlinefreeformadditionalproperties"></a>
|
||||
# **TestInlineFreeformAdditionalProperties**
|
||||
> void TestInlineFreeformAdditionalProperties (TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
|
||||
test inline free-form additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestInlineFreeformAdditionalPropertiesExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var testInlineFreeformAdditionalPropertiesRequest = new TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalProperties: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestInlineFreeformAdditionalPropertiesWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalPropertiesWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.TestInlineFreeformAdditionalPropertiesRequest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**SomeProperty** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class TestInlineFreeformAdditionalPropertiesRequestTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for TestInlineFreeformAdditionalPropertiesRequest
|
||||
//private TestInlineFreeformAdditionalPropertiesRequest instance;
|
||||
|
||||
public TestInlineFreeformAdditionalPropertiesRequestTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
//instance = new TestInlineFreeformAdditionalPropertiesRequest();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestInlineFreeformAdditionalPropertiesRequestInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" TestInlineFreeformAdditionalPropertiesRequest
|
||||
//Assert.IsType<TestInlineFreeformAdditionalPropertiesRequest>(instance);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'SomeProperty'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void SomePropertyTest()
|
||||
{
|
||||
// TODO unit test for the property 'SomeProperty'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -365,6 +365,26 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestInlineAdditionalPropertiesWithHttpInfo(Dictionary<string, string> requestBody, int operationIndex = 0);
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
void TestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0);
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0);
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
@@ -810,6 +830,31 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary<string, string> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestInlineFreeformAdditionalPropertiesWithHttpInfoAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@@ -3093,6 +3138,148 @@ namespace Org.OpenAPITools.Api
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
public void TestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0)
|
||||
{
|
||||
TestInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<Object> TestInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0)
|
||||
{
|
||||
// verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set
|
||||
if (testInlineFreeformAdditionalPropertiesRequest == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties");
|
||||
}
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = testInlineFreeformAdditionalPropertiesRequest;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestInlineFreeformAdditionalProperties";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Post<Object>("/fake/inline-freeform-additionalProperties", localVarRequestOptions, this.Configuration);
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestInlineFreeformAdditionalProperties", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
await TestInlineFreeformAdditionalPropertiesWithHttpInfoAsync(testInlineFreeformAdditionalPropertiesRequest, operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> TestInlineFreeformAdditionalPropertiesWithHttpInfoAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
// verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set
|
||||
if (testInlineFreeformAdditionalPropertiesRequest == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties");
|
||||
}
|
||||
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = testInlineFreeformAdditionalPropertiesRequest;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestInlineFreeformAdditionalProperties";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/fake/inline-freeform-additionalProperties", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestInlineFreeformAdditionalProperties", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
[DataContract(Name = "testInlineFreeformAdditionalProperties_request")]
|
||||
public partial class TestInlineFreeformAdditionalPropertiesRequest : Dictionary<String, Object>, IEquatable<TestInlineFreeformAdditionalPropertiesRequest>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TestInlineFreeformAdditionalPropertiesRequest" /> class.
|
||||
/// </summary>
|
||||
/// <param name="someProperty">someProperty.</param>
|
||||
public TestInlineFreeformAdditionalPropertiesRequest(string someProperty = default(string)) : base()
|
||||
{
|
||||
this.SomeProperty = someProperty;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets SomeProperty
|
||||
/// </summary>
|
||||
[DataMember(Name = "someProperty", EmitDefaultValue = false)]
|
||||
public string SomeProperty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, object> AdditionalProperties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class TestInlineFreeformAdditionalPropertiesRequest {\n");
|
||||
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append(" SomeProperty: ").Append(SomeProperty).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input as TestInlineFreeformAdditionalPropertiesRequest).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if TestInlineFreeformAdditionalPropertiesRequest instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of TestInlineFreeformAdditionalPropertiesRequest to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(TestInlineFreeformAdditionalPropertiesRequest input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = base.GetHashCode();
|
||||
if (this.SomeProperty != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.SomeProperty.GetHashCode();
|
||||
}
|
||||
if (this.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
return this.BaseValidate(validationContext);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
protected IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> BaseValidate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -90,6 +90,7 @@ docs/StoreApi.md
|
||||
docs/Tag.md
|
||||
docs/TestCollectionEndingWithWordList.md
|
||||
docs/TestCollectionEndingWithWordListObject.md
|
||||
docs/TestInlineFreeformAdditionalPropertiesRequest.md
|
||||
docs/Triangle.md
|
||||
docs/TriangleInterface.md
|
||||
docs/User.md
|
||||
@@ -209,6 +210,7 @@ src/Org.OpenAPITools/Model/SpecialModelName.cs
|
||||
src/Org.OpenAPITools/Model/Tag.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs
|
||||
src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs
|
||||
src/Org.OpenAPITools/Model/Triangle.cs
|
||||
src/Org.OpenAPITools/Model/TriangleInterface.cs
|
||||
src/Org.OpenAPITools/Model/User.cs
|
||||
|
||||
@@ -134,6 +134,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||
*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
*FakeApi* | [**TestInlineFreeformAdditionalProperties**](docs/FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties
|
||||
*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters |
|
||||
*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
@@ -244,6 +245,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.Tag](docs/Tag.md)
|
||||
- [Model.TestCollectionEndingWithWordList](docs/TestCollectionEndingWithWordList.md)
|
||||
- [Model.TestCollectionEndingWithWordListObject](docs/TestCollectionEndingWithWordListObject.md)
|
||||
- [Model.TestInlineFreeformAdditionalPropertiesRequest](docs/TestInlineFreeformAdditionalPropertiesRequest.md)
|
||||
- [Model.Triangle](docs/Triangle.md)
|
||||
- [Model.TriangleInterface](docs/TriangleInterface.md)
|
||||
- [Model.User](docs/User.md)
|
||||
|
||||
@@ -943,6 +943,23 @@ paths:
|
||||
summary: test inline additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/testInlineFreeformAdditionalProperties_request'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test inline free-form additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
operationId: testBodyWithQueryParams
|
||||
@@ -2488,6 +2505,12 @@ components:
|
||||
- param
|
||||
- param2
|
||||
type: object
|
||||
testInlineFreeformAdditionalProperties_request:
|
||||
additionalProperties: true
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
type: object
|
||||
uploadFileWithRequiredFile_request:
|
||||
properties:
|
||||
additionalMetadata:
|
||||
|
||||
@@ -17,6 +17,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters |
|
||||
| [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) |
|
||||
| [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties |
|
||||
| [**TestInlineFreeformAdditionalProperties**](FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties |
|
||||
| [**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data |
|
||||
| [**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | |
|
||||
|
||||
@@ -1205,6 +1206,91 @@ No authorization required
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a id="testinlinefreeformadditionalproperties"></a>
|
||||
# **TestInlineFreeformAdditionalProperties**
|
||||
> void TestInlineFreeformAdditionalProperties (TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
|
||||
test inline free-form additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestInlineFreeformAdditionalPropertiesExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var testInlineFreeformAdditionalPropertiesRequest = new TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalProperties: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestInlineFreeformAdditionalPropertiesWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalPropertiesWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.TestInlineFreeformAdditionalPropertiesRequest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**SomeProperty** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class TestInlineFreeformAdditionalPropertiesRequestTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for TestInlineFreeformAdditionalPropertiesRequest
|
||||
//private TestInlineFreeformAdditionalPropertiesRequest instance;
|
||||
|
||||
public TestInlineFreeformAdditionalPropertiesRequestTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
//instance = new TestInlineFreeformAdditionalPropertiesRequest();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestInlineFreeformAdditionalPropertiesRequestInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" TestInlineFreeformAdditionalPropertiesRequest
|
||||
//Assert.IsType<TestInlineFreeformAdditionalPropertiesRequest>(instance);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'SomeProperty'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void SomePropertyTest()
|
||||
{
|
||||
// TODO unit test for the property 'SomeProperty'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -365,6 +365,26 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestInlineAdditionalPropertiesWithHttpInfo(Dictionary<string, string> requestBody, int operationIndex = 0);
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
void TestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0);
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0);
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
@@ -810,6 +830,31 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary<string, string> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestInlineFreeformAdditionalPropertiesWithHttpInfoAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@@ -3093,6 +3138,148 @@ namespace Org.OpenAPITools.Api
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
public void TestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0)
|
||||
{
|
||||
TestInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<Object> TestInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0)
|
||||
{
|
||||
// verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set
|
||||
if (testInlineFreeformAdditionalPropertiesRequest == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties");
|
||||
}
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = testInlineFreeformAdditionalPropertiesRequest;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestInlineFreeformAdditionalProperties";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Post<Object>("/fake/inline-freeform-additionalProperties", localVarRequestOptions, this.Configuration);
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestInlineFreeformAdditionalProperties", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
await TestInlineFreeformAdditionalPropertiesWithHttpInfoAsync(testInlineFreeformAdditionalPropertiesRequest, operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> TestInlineFreeformAdditionalPropertiesWithHttpInfoAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
// verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set
|
||||
if (testInlineFreeformAdditionalPropertiesRequest == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties");
|
||||
}
|
||||
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = testInlineFreeformAdditionalPropertiesRequest;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestInlineFreeformAdditionalProperties";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/fake/inline-freeform-additionalProperties", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestInlineFreeformAdditionalProperties", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
[DataContract(Name = "testInlineFreeformAdditionalProperties_request")]
|
||||
public partial class TestInlineFreeformAdditionalPropertiesRequest : Dictionary<String, Object>, IEquatable<TestInlineFreeformAdditionalPropertiesRequest>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TestInlineFreeformAdditionalPropertiesRequest" /> class.
|
||||
/// </summary>
|
||||
/// <param name="someProperty">someProperty.</param>
|
||||
public TestInlineFreeformAdditionalPropertiesRequest(string someProperty = default(string)) : base()
|
||||
{
|
||||
this.SomeProperty = someProperty;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets SomeProperty
|
||||
/// </summary>
|
||||
[DataMember(Name = "someProperty", EmitDefaultValue = false)]
|
||||
public string SomeProperty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, object> AdditionalProperties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class TestInlineFreeformAdditionalPropertiesRequest {\n");
|
||||
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append(" SomeProperty: ").Append(SomeProperty).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input as TestInlineFreeformAdditionalPropertiesRequest).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if TestInlineFreeformAdditionalPropertiesRequest instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of TestInlineFreeformAdditionalPropertiesRequest to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(TestInlineFreeformAdditionalPropertiesRequest input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = base.GetHashCode();
|
||||
if (this.SomeProperty != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.SomeProperty.GetHashCode();
|
||||
}
|
||||
if (this.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
return this.BaseValidate(validationContext);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
protected IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> BaseValidate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -90,6 +90,7 @@ docs/StoreApi.md
|
||||
docs/Tag.md
|
||||
docs/TestCollectionEndingWithWordList.md
|
||||
docs/TestCollectionEndingWithWordListObject.md
|
||||
docs/TestInlineFreeformAdditionalPropertiesRequest.md
|
||||
docs/Triangle.md
|
||||
docs/TriangleInterface.md
|
||||
docs/User.md
|
||||
@@ -209,6 +210,7 @@ src/Org.OpenAPITools/Model/SpecialModelName.cs
|
||||
src/Org.OpenAPITools/Model/Tag.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs
|
||||
src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs
|
||||
src/Org.OpenAPITools/Model/Triangle.cs
|
||||
src/Org.OpenAPITools/Model/TriangleInterface.cs
|
||||
src/Org.OpenAPITools/Model/User.cs
|
||||
|
||||
@@ -134,6 +134,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||
*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
*FakeApi* | [**TestInlineFreeformAdditionalProperties**](docs/FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties
|
||||
*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters |
|
||||
*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
@@ -244,6 +245,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.Tag](docs/Tag.md)
|
||||
- [Model.TestCollectionEndingWithWordList](docs/TestCollectionEndingWithWordList.md)
|
||||
- [Model.TestCollectionEndingWithWordListObject](docs/TestCollectionEndingWithWordListObject.md)
|
||||
- [Model.TestInlineFreeformAdditionalPropertiesRequest](docs/TestInlineFreeformAdditionalPropertiesRequest.md)
|
||||
- [Model.Triangle](docs/Triangle.md)
|
||||
- [Model.TriangleInterface](docs/TriangleInterface.md)
|
||||
- [Model.User](docs/User.md)
|
||||
|
||||
@@ -943,6 +943,23 @@ paths:
|
||||
summary: test inline additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/testInlineFreeformAdditionalProperties_request'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test inline free-form additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
operationId: testBodyWithQueryParams
|
||||
@@ -2488,6 +2505,12 @@ components:
|
||||
- param
|
||||
- param2
|
||||
type: object
|
||||
testInlineFreeformAdditionalProperties_request:
|
||||
additionalProperties: true
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
type: object
|
||||
uploadFileWithRequiredFile_request:
|
||||
properties:
|
||||
additionalMetadata:
|
||||
|
||||
@@ -17,6 +17,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters |
|
||||
| [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) |
|
||||
| [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties |
|
||||
| [**TestInlineFreeformAdditionalProperties**](FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties |
|
||||
| [**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data |
|
||||
| [**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | |
|
||||
|
||||
@@ -1205,6 +1206,91 @@ No authorization required
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a id="testinlinefreeformadditionalproperties"></a>
|
||||
# **TestInlineFreeformAdditionalProperties**
|
||||
> void TestInlineFreeformAdditionalProperties (TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
|
||||
test inline free-form additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestInlineFreeformAdditionalPropertiesExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var testInlineFreeformAdditionalPropertiesRequest = new TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalProperties: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestInlineFreeformAdditionalPropertiesWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalPropertiesWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.TestInlineFreeformAdditionalPropertiesRequest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**SomeProperty** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class TestInlineFreeformAdditionalPropertiesRequestTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for TestInlineFreeformAdditionalPropertiesRequest
|
||||
//private TestInlineFreeformAdditionalPropertiesRequest instance;
|
||||
|
||||
public TestInlineFreeformAdditionalPropertiesRequestTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
//instance = new TestInlineFreeformAdditionalPropertiesRequest();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestInlineFreeformAdditionalPropertiesRequestInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" TestInlineFreeformAdditionalPropertiesRequest
|
||||
//Assert.IsType<TestInlineFreeformAdditionalPropertiesRequest>(instance);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'SomeProperty'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void SomePropertyTest()
|
||||
{
|
||||
// TODO unit test for the property 'SomeProperty'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -365,6 +365,26 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestInlineAdditionalPropertiesWithHttpInfo(Dictionary<string, string> requestBody, int operationIndex = 0);
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
void TestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0);
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0);
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
@@ -810,6 +830,31 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary<string, string> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestInlineFreeformAdditionalPropertiesWithHttpInfoAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@@ -3093,6 +3138,148 @@ namespace Org.OpenAPITools.Api
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
public void TestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0)
|
||||
{
|
||||
TestInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<Object> TestInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0)
|
||||
{
|
||||
// verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set
|
||||
if (testInlineFreeformAdditionalPropertiesRequest == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties");
|
||||
}
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = testInlineFreeformAdditionalPropertiesRequest;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestInlineFreeformAdditionalProperties";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Post<Object>("/fake/inline-freeform-additionalProperties", localVarRequestOptions, this.Configuration);
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestInlineFreeformAdditionalProperties", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
await TestInlineFreeformAdditionalPropertiesWithHttpInfoAsync(testInlineFreeformAdditionalPropertiesRequest, operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> TestInlineFreeformAdditionalPropertiesWithHttpInfoAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
// verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set
|
||||
if (testInlineFreeformAdditionalPropertiesRequest == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties");
|
||||
}
|
||||
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = testInlineFreeformAdditionalPropertiesRequest;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestInlineFreeformAdditionalProperties";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/fake/inline-freeform-additionalProperties", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestInlineFreeformAdditionalProperties", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
[DataContract(Name = "testInlineFreeformAdditionalProperties_request")]
|
||||
public partial class TestInlineFreeformAdditionalPropertiesRequest : Dictionary<String, Object>, IEquatable<TestInlineFreeformAdditionalPropertiesRequest>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TestInlineFreeformAdditionalPropertiesRequest" /> class.
|
||||
/// </summary>
|
||||
/// <param name="someProperty">someProperty.</param>
|
||||
public TestInlineFreeformAdditionalPropertiesRequest(string someProperty = default(string)) : base()
|
||||
{
|
||||
this.SomeProperty = someProperty;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets SomeProperty
|
||||
/// </summary>
|
||||
[DataMember(Name = "someProperty", EmitDefaultValue = false)]
|
||||
public string SomeProperty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, object> AdditionalProperties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class TestInlineFreeformAdditionalPropertiesRequest {\n");
|
||||
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append(" SomeProperty: ").Append(SomeProperty).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input as TestInlineFreeformAdditionalPropertiesRequest).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if TestInlineFreeformAdditionalPropertiesRequest instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of TestInlineFreeformAdditionalPropertiesRequest to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(TestInlineFreeformAdditionalPropertiesRequest input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = base.GetHashCode();
|
||||
if (this.SomeProperty != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.SomeProperty.GetHashCode();
|
||||
}
|
||||
if (this.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
return this.BaseValidate(validationContext);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
protected IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> BaseValidate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -88,6 +88,7 @@ docs/StoreApi.md
|
||||
docs/Tag.md
|
||||
docs/TestCollectionEndingWithWordList.md
|
||||
docs/TestCollectionEndingWithWordListObject.md
|
||||
docs/TestInlineFreeformAdditionalPropertiesRequest.md
|
||||
docs/Triangle.md
|
||||
docs/TriangleInterface.md
|
||||
docs/User.md
|
||||
@@ -205,6 +206,7 @@ src/Org.OpenAPITools/Model/SpecialModelName.cs
|
||||
src/Org.OpenAPITools/Model/Tag.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs
|
||||
src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs
|
||||
src/Org.OpenAPITools/Model/Triangle.cs
|
||||
src/Org.OpenAPITools/Model/TriangleInterface.cs
|
||||
src/Org.OpenAPITools/Model/User.cs
|
||||
|
||||
@@ -108,6 +108,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||
*FakeApi* | [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
*FakeApi* | [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
*FakeApi* | [**TestInlineFreeformAdditionalProperties**](FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties
|
||||
*FakeApi* | [**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
*FakeApi* | [**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters |
|
||||
*FakeClassnameTags123Api* | [**TestClassname**](FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
@@ -218,6 +219,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.Tag](Tag.md)
|
||||
- [Model.TestCollectionEndingWithWordList](TestCollectionEndingWithWordList.md)
|
||||
- [Model.TestCollectionEndingWithWordListObject](TestCollectionEndingWithWordListObject.md)
|
||||
- [Model.TestInlineFreeformAdditionalPropertiesRequest](TestInlineFreeformAdditionalPropertiesRequest.md)
|
||||
- [Model.Triangle](Triangle.md)
|
||||
- [Model.TriangleInterface](TriangleInterface.md)
|
||||
- [Model.User](User.md)
|
||||
|
||||
@@ -943,6 +943,23 @@ paths:
|
||||
summary: test inline additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/testInlineFreeformAdditionalProperties_request'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test inline free-form additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
operationId: testBodyWithQueryParams
|
||||
@@ -2488,6 +2505,12 @@ components:
|
||||
- param
|
||||
- param2
|
||||
type: object
|
||||
testInlineFreeformAdditionalProperties_request:
|
||||
additionalProperties: true
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
type: object
|
||||
uploadFileWithRequiredFile_request:
|
||||
properties:
|
||||
additionalMetadata:
|
||||
|
||||
@@ -17,6 +17,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters |
|
||||
| [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) |
|
||||
| [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties |
|
||||
| [**TestInlineFreeformAdditionalProperties**](FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties |
|
||||
| [**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data |
|
||||
| [**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | |
|
||||
|
||||
@@ -1205,6 +1206,91 @@ No authorization required
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a id="testinlinefreeformadditionalproperties"></a>
|
||||
# **TestInlineFreeformAdditionalProperties**
|
||||
> void TestInlineFreeformAdditionalProperties (TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
|
||||
test inline free-form additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestInlineFreeformAdditionalPropertiesExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var testInlineFreeformAdditionalPropertiesRequest = new TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalProperties: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestInlineFreeformAdditionalPropertiesWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalPropertiesWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.TestInlineFreeformAdditionalPropertiesRequest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**SomeProperty** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class TestInlineFreeformAdditionalPropertiesRequestTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for TestInlineFreeformAdditionalPropertiesRequest
|
||||
//private TestInlineFreeformAdditionalPropertiesRequest instance;
|
||||
|
||||
public TestInlineFreeformAdditionalPropertiesRequestTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
//instance = new TestInlineFreeformAdditionalPropertiesRequest();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestInlineFreeformAdditionalPropertiesRequestInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" TestInlineFreeformAdditionalPropertiesRequest
|
||||
//Assert.IsType<TestInlineFreeformAdditionalPropertiesRequest>(instance);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'SomeProperty'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void SomePropertyTest()
|
||||
{
|
||||
// TODO unit test for the property 'SomeProperty'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -338,6 +338,24 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestInlineAdditionalPropertiesWithHttpInfo(Dictionary<string, string> requestBody);
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <returns></returns>
|
||||
void TestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest);
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest);
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
@@ -753,6 +771,29 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary<string, string> requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestInlineFreeformAdditionalPropertiesWithHttpInfoAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@@ -2844,6 +2885,130 @@ namespace Org.OpenAPITools.Api
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <returns></returns>
|
||||
public void TestInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
{
|
||||
TestInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<Object> TestInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
{
|
||||
// verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set
|
||||
if (testInlineFreeformAdditionalPropertiesRequest == null)
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties");
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
|
||||
localVarRequestOptions.Data = testInlineFreeformAdditionalPropertiesRequest;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Post<Object>("/fake/inline-freeform-additionalProperties", localVarRequestOptions, this.Configuration);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestInlineFreeformAdditionalProperties", localVarResponse);
|
||||
if (_exception != null) throw _exception;
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task TestInlineFreeformAdditionalPropertiesAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
var task = TestInlineFreeformAdditionalPropertiesWithHttpInfoAsync(testInlineFreeformAdditionalPropertiesRequest, cancellationToken);
|
||||
#if UNITY_EDITOR || !UNITY_WEBGL
|
||||
await task.ConfigureAwait(false);
|
||||
#else
|
||||
await task;
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test inline free-form additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="testInlineFreeformAdditionalPropertiesRequest">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> TestInlineFreeformAdditionalPropertiesWithHttpInfoAsync(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
// verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set
|
||||
if (testInlineFreeformAdditionalPropertiesRequest == null)
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling FakeApi->TestInlineFreeformAdditionalProperties");
|
||||
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
|
||||
localVarRequestOptions.Data = testInlineFreeformAdditionalPropertiesRequest;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
|
||||
var task = this.AsynchronousClient.PostAsync<Object>("/fake/inline-freeform-additionalProperties", localVarRequestOptions, this.Configuration, cancellationToken);
|
||||
|
||||
#if UNITY_EDITOR || !UNITY_WEBGL
|
||||
var localVarResponse = await task.ConfigureAwait(false);
|
||||
#else
|
||||
var localVarResponse = await task;
|
||||
#endif
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestInlineFreeformAdditionalProperties", localVarResponse);
|
||||
if (_exception != null) throw _exception;
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// TestInlineFreeformAdditionalPropertiesRequest
|
||||
/// </summary>
|
||||
[DataContract(Name = "testInlineFreeformAdditionalProperties_request")]
|
||||
public partial class TestInlineFreeformAdditionalPropertiesRequest : Dictionary<String, Object>, IEquatable<TestInlineFreeformAdditionalPropertiesRequest>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TestInlineFreeformAdditionalPropertiesRequest" /> class.
|
||||
/// </summary>
|
||||
/// <param name="someProperty">someProperty.</param>
|
||||
public TestInlineFreeformAdditionalPropertiesRequest(string someProperty = default(string)) : base()
|
||||
{
|
||||
this.SomeProperty = someProperty;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets SomeProperty
|
||||
/// </summary>
|
||||
[DataMember(Name = "someProperty", EmitDefaultValue = false)]
|
||||
public string SomeProperty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, object> AdditionalProperties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class TestInlineFreeformAdditionalPropertiesRequest {\n");
|
||||
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append(" SomeProperty: ").Append(SomeProperty).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as TestInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if TestInlineFreeformAdditionalPropertiesRequest instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of TestInlineFreeformAdditionalPropertiesRequest to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(TestInlineFreeformAdditionalPropertiesRequest input)
|
||||
{
|
||||
if (input == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return base.Equals(input) &&
|
||||
(
|
||||
this.SomeProperty == input.SomeProperty ||
|
||||
(this.SomeProperty != null &&
|
||||
this.SomeProperty.Equals(input.SomeProperty))
|
||||
)
|
||||
&& (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = base.GetHashCode();
|
||||
if (this.SomeProperty != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.SomeProperty.GetHashCode();
|
||||
}
|
||||
if (this.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -90,6 +90,7 @@ docs/StoreApi.md
|
||||
docs/Tag.md
|
||||
docs/TestCollectionEndingWithWordList.md
|
||||
docs/TestCollectionEndingWithWordListObject.md
|
||||
docs/TestInlineFreeformAdditionalPropertiesRequest.md
|
||||
docs/Triangle.md
|
||||
docs/TriangleInterface.md
|
||||
docs/User.md
|
||||
@@ -208,6 +209,7 @@ src/Org.OpenAPITools/Model/SpecialModelName.cs
|
||||
src/Org.OpenAPITools/Model/Tag.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs
|
||||
src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs
|
||||
src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs
|
||||
src/Org.OpenAPITools/Model/Triangle.cs
|
||||
src/Org.OpenAPITools/Model/TriangleInterface.cs
|
||||
src/Org.OpenAPITools/Model/User.cs
|
||||
|
||||
@@ -122,6 +122,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||
*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
*FakeApi* | [**TestInlineFreeformAdditionalProperties**](docs/FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties
|
||||
*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters |
|
||||
*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
@@ -232,6 +233,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.Tag](docs/Tag.md)
|
||||
- [Model.TestCollectionEndingWithWordList](docs/TestCollectionEndingWithWordList.md)
|
||||
- [Model.TestCollectionEndingWithWordListObject](docs/TestCollectionEndingWithWordListObject.md)
|
||||
- [Model.TestInlineFreeformAdditionalPropertiesRequest](docs/TestInlineFreeformAdditionalPropertiesRequest.md)
|
||||
- [Model.Triangle](docs/Triangle.md)
|
||||
- [Model.TriangleInterface](docs/TriangleInterface.md)
|
||||
- [Model.User](docs/User.md)
|
||||
|
||||
@@ -943,6 +943,23 @@ paths:
|
||||
summary: test inline additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-freeform-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testInlineFreeformAdditionalProperties
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/testInlineFreeformAdditionalProperties_request'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test inline free-form additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/body-with-query-params:
|
||||
put:
|
||||
operationId: testBodyWithQueryParams
|
||||
@@ -2488,6 +2505,12 @@ components:
|
||||
- param
|
||||
- param2
|
||||
type: object
|
||||
testInlineFreeformAdditionalProperties_request:
|
||||
additionalProperties: true
|
||||
properties:
|
||||
someProperty:
|
||||
type: string
|
||||
type: object
|
||||
uploadFileWithRequiredFile_request:
|
||||
properties:
|
||||
additionalMetadata:
|
||||
|
||||
@@ -17,6 +17,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters |
|
||||
| [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) |
|
||||
| [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties |
|
||||
| [**TestInlineFreeformAdditionalProperties**](FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties |
|
||||
| [**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data |
|
||||
| [**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | |
|
||||
|
||||
@@ -1205,6 +1206,91 @@ No authorization required
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a id="testinlinefreeformadditionalproperties"></a>
|
||||
# **TestInlineFreeformAdditionalProperties**
|
||||
> void TestInlineFreeformAdditionalProperties (TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
|
||||
|
||||
test inline free-form additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestInlineFreeformAdditionalPropertiesExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var testInlineFreeformAdditionalPropertiesRequest = new TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalProperties: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestInlineFreeformAdditionalPropertiesWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test inline free-form additionalProperties
|
||||
apiInstance.TestInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalPropertiesWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user