Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
generate samples
  • Loading branch information
martin-mfg committed Jan 14, 2024
commit 87c39c61d88c85c6da65e070d3488259aaceb0cf
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ Class | Method | HTTP request | Description
*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 |
*FakeApi* | [**TestStringMapReference**](docs/FakeApi.md#teststringmapreference) | **POST** /fake/stringMap-reference | test referenced string map
*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case
*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,23 @@ paths:
summary: test referenced additionalProperties
tags:
- fake
/fake/stringMap-reference:
post:
description: ""
operationId: testStringMapReference
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MapOfString'
description: request body
required: true
responses:
"200":
description: successful operation
summary: test referenced string map
tags:
- fake
/fake/inline-additionalProperties:
post:
description: ""
Expand Down Expand Up @@ -1889,6 +1906,11 @@ components:
additionalProperties: true
description: A schema consisting only of additional properties
type: object
MapOfString:
additionalProperties:
type: string
description: A schema consisting only of additional properties of type string
type: object
OuterEnum:
enum:
- placed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
| [**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 | |
| [**TestStringMapReference**](FakeApi.md#teststringmapreference) | **POST** /fake/stringMap-reference | test referenced string map |

<a id="fakehealthget"></a>
# **FakeHealthGet**
Expand Down Expand Up @@ -1572,3 +1573,88 @@ No authorization required

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a id="teststringmapreference"></a>
# **TestStringMapReference**
> void TestStringMapReference (Dictionary<string, string> requestBody)

test referenced string map

### 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 TestStringMapReferenceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
var apiInstance = new FakeApi(config);
var requestBody = new Dictionary<string, string>(); // Dictionary<string, string> | request body

try
{
// test referenced string map
apiInstance.TestStringMapReference(requestBody);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestStringMapReference: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
```

#### Using the TestStringMapReferenceWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.

```csharp
try
{
// test referenced string map
apiInstance.TestStringMapReferenceWithHttpInfo(requestBody);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestStringMapReferenceWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
```

### Parameters

| Name | Type | Description | Notes |
|------|------|-------------|-------|
| **requestBody** | [**Dictionary&lt;string, string&gt;**](string.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 |
|-------------|-------------|------------------|
| **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)

Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,26 @@ public interface IFakeApiSync : IApiAccessor
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> TestQueryParameterCollectionFormatWithHttpInfo(List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0);
/// <summary>
/// test referenced string map
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="requestBody">request body</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns></returns>
void TestStringMapReference(Dictionary<string, string> requestBody, int operationIndex = 0);

/// <summary>
/// test referenced string map
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="requestBody">request body</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> TestStringMapReferenceWithHttpInfo(Dictionary<string, string> requestBody, int operationIndex = 0);
#endregion Synchronous Operations
}

Expand Down Expand Up @@ -967,6 +987,31 @@ public interface IFakeApiAsync : IApiAccessor
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> TestQueryParameterCollectionFormatWithHttpInfoAsync(List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = default(string), string notRequiredNullable = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// test referenced string map
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="requestBody">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 TestStringMapReferenceAsync(Dictionary<string, string> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

/// <summary>
/// test referenced string map
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="requestBody">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>> TestStringMapReferenceWithHttpInfoAsync(Dictionary<string, string> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
#endregion Asynchronous Operations
}

Expand Down Expand Up @@ -3899,5 +3944,147 @@ public Org.OpenAPITools.Client.ApiResponse<Object> TestJsonFormDataWithHttpInfo(
return localVarResponse;
}

/// <summary>
/// test referenced string map
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="requestBody">request body</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns></returns>
public void TestStringMapReference(Dictionary<string, string> requestBody, int operationIndex = 0)
{
TestStringMapReferenceWithHttpInfo(requestBody);
}

/// <summary>
/// test referenced string map
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="requestBody">request body</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of Object(void)</returns>
public Org.OpenAPITools.Client.ApiResponse<Object> TestStringMapReferenceWithHttpInfo(Dictionary<string, string> requestBody, int operationIndex = 0)
{
// verify the required parameter 'requestBody' is set
if (requestBody == null)
{
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestStringMapReference");
}

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 = requestBody;

localVarRequestOptions.Operation = "FakeApi.TestStringMapReference";
localVarRequestOptions.OperationIndex = operationIndex;


// make the HTTP request
var localVarResponse = this.Client.Post<Object>("/fake/stringMap-reference", localVarRequestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("TestStringMapReference", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}

return localVarResponse;
}

/// <summary>
/// test referenced string map
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="requestBody">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 TestStringMapReferenceAsync(Dictionary<string, string> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await TestStringMapReferenceWithHttpInfoAsync(requestBody, operationIndex, cancellationToken).ConfigureAwait(false);
}

/// <summary>
/// test referenced string map
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="requestBody">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>> TestStringMapReferenceWithHttpInfoAsync(Dictionary<string, string> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'requestBody' is set
if (requestBody == null)
{
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestStringMapReference");
}


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 = requestBody;

localVarRequestOptions.Operation = "FakeApi.TestStringMapReference";
localVarRequestOptions.OperationIndex = operationIndex;


// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/fake/stringMap-reference", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);

if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("TestStringMapReference", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}

return localVarResponse;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,23 @@ paths:
summary: test referenced additionalProperties
tags:
- fake
/fake/stringMap-reference:
post:
description: ""
operationId: testStringMapReference
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MapOfString'
description: request body
required: true
responses:
"200":
description: successful operation
summary: test referenced string map
tags:
- fake
/fake/inline-additionalProperties:
post:
description: ""
Expand Down Expand Up @@ -1889,6 +1906,11 @@ components:
additionalProperties: true
description: A schema consisting only of additional properties
type: object
MapOfString:
additionalProperties:
type: string
description: A schema consisting only of additional properties of type string
type: object
OuterEnum:
enum:
- placed
Expand Down
Loading