mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-19 21:47:13 +00:00
[python] Add tests and fix enum path parameters (#16769)
* test: Tests for enum params in path, query and header * fix: Get enum ref values correctly in path parameters Closes #16688 * fix java tests failure --------- Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
@@ -16,6 +16,7 @@ using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Mime;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
@@ -36,9 +37,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="integerHeader"> (optional)</param>
|
||||
/// <param name="booleanHeader"> (optional)</param>
|
||||
/// <param name="stringHeader"> (optional)</param>
|
||||
/// <param name="enumNonrefStringHeader"> (optional)</param>
|
||||
/// <param name="enumRefStringHeader"> (optional)</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>string</returns>
|
||||
string TestHeaderIntegerBooleanString(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), int operationIndex = 0);
|
||||
string TestHeaderIntegerBooleanStringEnums(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), string? enumNonrefStringHeader = default(string?), StringEnumRef? enumRefStringHeader = default(StringEnumRef?), int operationIndex = 0);
|
||||
|
||||
/// <summary>
|
||||
/// Test header parameter(s)
|
||||
@@ -50,9 +53,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="integerHeader"> (optional)</param>
|
||||
/// <param name="booleanHeader"> (optional)</param>
|
||||
/// <param name="stringHeader"> (optional)</param>
|
||||
/// <param name="enumNonrefStringHeader"> (optional)</param>
|
||||
/// <param name="enumRefStringHeader"> (optional)</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of string</returns>
|
||||
ApiResponse<string> TestHeaderIntegerBooleanStringWithHttpInfo(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), int operationIndex = 0);
|
||||
ApiResponse<string> TestHeaderIntegerBooleanStringEnumsWithHttpInfo(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), string? enumNonrefStringHeader = default(string?), StringEnumRef? enumRefStringHeader = default(StringEnumRef?), int operationIndex = 0);
|
||||
#endregion Synchronous Operations
|
||||
}
|
||||
|
||||
@@ -72,10 +77,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="integerHeader"> (optional)</param>
|
||||
/// <param name="booleanHeader"> (optional)</param>
|
||||
/// <param name="stringHeader"> (optional)</param>
|
||||
/// <param name="enumNonrefStringHeader"> (optional)</param>
|
||||
/// <param name="enumRefStringHeader"> (optional)</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of string</returns>
|
||||
System.Threading.Tasks.Task<string> TestHeaderIntegerBooleanStringAsync(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
System.Threading.Tasks.Task<string> TestHeaderIntegerBooleanStringEnumsAsync(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), string? enumNonrefStringHeader = default(string?), StringEnumRef? enumRefStringHeader = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// Test header parameter(s)
|
||||
@@ -87,10 +94,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="integerHeader"> (optional)</param>
|
||||
/// <param name="booleanHeader"> (optional)</param>
|
||||
/// <param name="stringHeader"> (optional)</param>
|
||||
/// <param name="enumNonrefStringHeader"> (optional)</param>
|
||||
/// <param name="enumRefStringHeader"> (optional)</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (string)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<string>> TestHeaderIntegerBooleanStringWithHttpInfoAsync(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
System.Threading.Tasks.Task<ApiResponse<string>> TestHeaderIntegerBooleanStringEnumsWithHttpInfoAsync(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), string? enumNonrefStringHeader = default(string?), StringEnumRef? enumRefStringHeader = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
@@ -218,11 +227,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="integerHeader"> (optional)</param>
|
||||
/// <param name="booleanHeader"> (optional)</param>
|
||||
/// <param name="stringHeader"> (optional)</param>
|
||||
/// <param name="enumNonrefStringHeader"> (optional)</param>
|
||||
/// <param name="enumRefStringHeader"> (optional)</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>string</returns>
|
||||
public string TestHeaderIntegerBooleanString(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), int operationIndex = 0)
|
||||
public string TestHeaderIntegerBooleanStringEnums(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), string? enumNonrefStringHeader = default(string?), StringEnumRef? enumRefStringHeader = default(StringEnumRef?), int operationIndex = 0)
|
||||
{
|
||||
Org.OpenAPITools.Client.ApiResponse<string> localVarResponse = TestHeaderIntegerBooleanStringWithHttpInfo(integerHeader, booleanHeader, stringHeader);
|
||||
Org.OpenAPITools.Client.ApiResponse<string> localVarResponse = TestHeaderIntegerBooleanStringEnumsWithHttpInfo(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
@@ -233,9 +244,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="integerHeader"> (optional)</param>
|
||||
/// <param name="booleanHeader"> (optional)</param>
|
||||
/// <param name="stringHeader"> (optional)</param>
|
||||
/// <param name="enumNonrefStringHeader"> (optional)</param>
|
||||
/// <param name="enumRefStringHeader"> (optional)</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of string</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<string> TestHeaderIntegerBooleanStringWithHttpInfo(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), int operationIndex = 0)
|
||||
public Org.OpenAPITools.Client.ApiResponse<string> TestHeaderIntegerBooleanStringEnumsWithHttpInfo(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), string? enumNonrefStringHeader = default(string?), StringEnumRef? enumRefStringHeader = default(StringEnumRef?), int operationIndex = 0)
|
||||
{
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
@@ -271,16 +284,24 @@ namespace Org.OpenAPITools.Api
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(stringHeader)); // header parameter
|
||||
}
|
||||
if (enumNonrefStringHeader != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("enum_nonref_string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumNonrefStringHeader)); // header parameter
|
||||
}
|
||||
if (enumRefStringHeader != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("enum_ref_string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumRefStringHeader)); // header parameter
|
||||
}
|
||||
|
||||
localVarRequestOptions.Operation = "HeaderApi.TestHeaderIntegerBooleanString";
|
||||
localVarRequestOptions.Operation = "HeaderApi.TestHeaderIntegerBooleanStringEnums";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Get<string>("/header/integer/boolean/string", localVarRequestOptions, this.Configuration);
|
||||
var localVarResponse = this.Client.Get<string>("/header/integer/boolean/string/enums", localVarRequestOptions, this.Configuration);
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestHeaderIntegerBooleanString", localVarResponse);
|
||||
Exception _exception = this.ExceptionFactory("TestHeaderIntegerBooleanStringEnums", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
@@ -297,12 +318,14 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="integerHeader"> (optional)</param>
|
||||
/// <param name="booleanHeader"> (optional)</param>
|
||||
/// <param name="stringHeader"> (optional)</param>
|
||||
/// <param name="enumNonrefStringHeader"> (optional)</param>
|
||||
/// <param name="enumRefStringHeader"> (optional)</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of string</returns>
|
||||
public async System.Threading.Tasks.Task<string> TestHeaderIntegerBooleanStringAsync(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
public async System.Threading.Tasks.Task<string> TestHeaderIntegerBooleanStringEnumsAsync(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), string? enumNonrefStringHeader = default(string?), StringEnumRef? enumRefStringHeader = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
Org.OpenAPITools.Client.ApiResponse<string> localVarResponse = await TestHeaderIntegerBooleanStringWithHttpInfoAsync(integerHeader, booleanHeader, stringHeader, operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
Org.OpenAPITools.Client.ApiResponse<string> localVarResponse = await TestHeaderIntegerBooleanStringEnumsWithHttpInfoAsync(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader, operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
@@ -313,10 +336,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="integerHeader"> (optional)</param>
|
||||
/// <param name="booleanHeader"> (optional)</param>
|
||||
/// <param name="stringHeader"> (optional)</param>
|
||||
/// <param name="enumNonrefStringHeader"> (optional)</param>
|
||||
/// <param name="enumRefStringHeader"> (optional)</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (string)</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<string>> TestHeaderIntegerBooleanStringWithHttpInfoAsync(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<string>> TestHeaderIntegerBooleanStringEnumsWithHttpInfoAsync(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), string? enumNonrefStringHeader = default(string?), StringEnumRef? enumRefStringHeader = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
@@ -353,17 +378,25 @@ namespace Org.OpenAPITools.Api
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(stringHeader)); // header parameter
|
||||
}
|
||||
if (enumNonrefStringHeader != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("enum_nonref_string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumNonrefStringHeader)); // header parameter
|
||||
}
|
||||
if (enumRefStringHeader != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("enum_ref_string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumRefStringHeader)); // header parameter
|
||||
}
|
||||
|
||||
localVarRequestOptions.Operation = "HeaderApi.TestHeaderIntegerBooleanString";
|
||||
localVarRequestOptions.Operation = "HeaderApi.TestHeaderIntegerBooleanStringEnums";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = await this.AsynchronousClient.GetAsync<string>("/header/integer/boolean/string", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
var localVarResponse = await this.AsynchronousClient.GetAsync<string>("/header/integer/boolean/string/enums", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestHeaderIntegerBooleanString", localVarResponse);
|
||||
Exception _exception = this.ExceptionFactory("TestHeaderIntegerBooleanStringEnums", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
|
||||
@@ -16,6 +16,7 @@ using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Mime;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
@@ -35,9 +36,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="pathString"></param>
|
||||
/// <param name="pathInteger"></param>
|
||||
/// <param name="enumNonrefStringPath"></param>
|
||||
/// <param name="enumRefStringPath"></param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>string</returns>
|
||||
string TestsPathStringPathStringIntegerPathInteger(string pathString, int pathInteger, int operationIndex = 0);
|
||||
string TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(string pathString, int pathInteger, string enumNonrefStringPath, StringEnumRef enumRefStringPath, int operationIndex = 0);
|
||||
|
||||
/// <summary>
|
||||
/// Test path parameter(s)
|
||||
@@ -48,9 +51,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="pathString"></param>
|
||||
/// <param name="pathInteger"></param>
|
||||
/// <param name="enumNonrefStringPath"></param>
|
||||
/// <param name="enumRefStringPath"></param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of string</returns>
|
||||
ApiResponse<string> TestsPathStringPathStringIntegerPathIntegerWithHttpInfo(string pathString, int pathInteger, int operationIndex = 0);
|
||||
ApiResponse<string> TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(string pathString, int pathInteger, string enumNonrefStringPath, StringEnumRef enumRefStringPath, int operationIndex = 0);
|
||||
#endregion Synchronous Operations
|
||||
}
|
||||
|
||||
@@ -69,10 +74,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="pathString"></param>
|
||||
/// <param name="pathInteger"></param>
|
||||
/// <param name="enumNonrefStringPath"></param>
|
||||
/// <param name="enumRefStringPath"></param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of string</returns>
|
||||
System.Threading.Tasks.Task<string> TestsPathStringPathStringIntegerPathIntegerAsync(string pathString, int pathInteger, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
System.Threading.Tasks.Task<string> TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathAsync(string pathString, int pathInteger, string enumNonrefStringPath, StringEnumRef enumRefStringPath, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// Test path parameter(s)
|
||||
@@ -83,10 +90,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="pathString"></param>
|
||||
/// <param name="pathInteger"></param>
|
||||
/// <param name="enumNonrefStringPath"></param>
|
||||
/// <param name="enumRefStringPath"></param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (string)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<string>> TestsPathStringPathStringIntegerPathIntegerWithHttpInfoAsync(string pathString, int pathInteger, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
System.Threading.Tasks.Task<ApiResponse<string>> TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfoAsync(string pathString, int pathInteger, string enumNonrefStringPath, StringEnumRef enumRefStringPath, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
@@ -213,11 +222,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="pathString"></param>
|
||||
/// <param name="pathInteger"></param>
|
||||
/// <param name="enumNonrefStringPath"></param>
|
||||
/// <param name="enumRefStringPath"></param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>string</returns>
|
||||
public string TestsPathStringPathStringIntegerPathInteger(string pathString, int pathInteger, int operationIndex = 0)
|
||||
public string TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(string pathString, int pathInteger, string enumNonrefStringPath, StringEnumRef enumRefStringPath, int operationIndex = 0)
|
||||
{
|
||||
Org.OpenAPITools.Client.ApiResponse<string> localVarResponse = TestsPathStringPathStringIntegerPathIntegerWithHttpInfo(pathString, pathInteger);
|
||||
Org.OpenAPITools.Client.ApiResponse<string> localVarResponse = TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
@@ -227,14 +238,28 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="pathString"></param>
|
||||
/// <param name="pathInteger"></param>
|
||||
/// <param name="enumNonrefStringPath"></param>
|
||||
/// <param name="enumRefStringPath"></param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of string</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<string> TestsPathStringPathStringIntegerPathIntegerWithHttpInfo(string pathString, int pathInteger, int operationIndex = 0)
|
||||
public Org.OpenAPITools.Client.ApiResponse<string> TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(string pathString, int pathInteger, string enumNonrefStringPath, StringEnumRef enumRefStringPath, int operationIndex = 0)
|
||||
{
|
||||
// verify the required parameter 'pathString' is set
|
||||
if (pathString == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pathString' when calling PathApi->TestsPathStringPathStringIntegerPathInteger");
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pathString' when calling PathApi->TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath");
|
||||
}
|
||||
|
||||
// verify the required parameter 'enumNonrefStringPath' is set
|
||||
if (enumNonrefStringPath == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'enumNonrefStringPath' when calling PathApi->TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath");
|
||||
}
|
||||
|
||||
// verify the required parameter 'enumRefStringPath' is set
|
||||
if (enumRefStringPath == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'enumRefStringPath' when calling PathApi->TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath");
|
||||
}
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
@@ -261,16 +286,18 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
localVarRequestOptions.PathParameters.Add("path_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(pathString)); // path parameter
|
||||
localVarRequestOptions.PathParameters.Add("path_integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(pathInteger)); // path parameter
|
||||
localVarRequestOptions.PathParameters.Add("enum_nonref_string_path", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumNonrefStringPath)); // path parameter
|
||||
localVarRequestOptions.PathParameters.Add("enum_ref_string_path", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumRefStringPath)); // path parameter
|
||||
|
||||
localVarRequestOptions.Operation = "PathApi.TestsPathStringPathStringIntegerPathInteger";
|
||||
localVarRequestOptions.Operation = "PathApi.TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Get<string>("/path/string/{path_string}/integer/{path_integer}", localVarRequestOptions, this.Configuration);
|
||||
var localVarResponse = this.Client.Get<string>("/path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path}", localVarRequestOptions, this.Configuration);
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestsPathStringPathStringIntegerPathInteger", localVarResponse);
|
||||
Exception _exception = this.ExceptionFactory("TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
@@ -286,12 +313,14 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="pathString"></param>
|
||||
/// <param name="pathInteger"></param>
|
||||
/// <param name="enumNonrefStringPath"></param>
|
||||
/// <param name="enumRefStringPath"></param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of string</returns>
|
||||
public async System.Threading.Tasks.Task<string> TestsPathStringPathStringIntegerPathIntegerAsync(string pathString, int pathInteger, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
public async System.Threading.Tasks.Task<string> TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathAsync(string pathString, int pathInteger, string enumNonrefStringPath, StringEnumRef enumRefStringPath, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
Org.OpenAPITools.Client.ApiResponse<string> localVarResponse = await TestsPathStringPathStringIntegerPathIntegerWithHttpInfoAsync(pathString, pathInteger, operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
Org.OpenAPITools.Client.ApiResponse<string> localVarResponse = await TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfoAsync(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath, operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
@@ -301,15 +330,29 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="pathString"></param>
|
||||
/// <param name="pathInteger"></param>
|
||||
/// <param name="enumNonrefStringPath"></param>
|
||||
/// <param name="enumRefStringPath"></param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (string)</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<string>> TestsPathStringPathStringIntegerPathIntegerWithHttpInfoAsync(string pathString, int pathInteger, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<string>> TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfoAsync(string pathString, int pathInteger, string enumNonrefStringPath, StringEnumRef enumRefStringPath, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
// verify the required parameter 'pathString' is set
|
||||
if (pathString == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pathString' when calling PathApi->TestsPathStringPathStringIntegerPathInteger");
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pathString' when calling PathApi->TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath");
|
||||
}
|
||||
|
||||
// verify the required parameter 'enumNonrefStringPath' is set
|
||||
if (enumNonrefStringPath == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'enumNonrefStringPath' when calling PathApi->TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath");
|
||||
}
|
||||
|
||||
// verify the required parameter 'enumRefStringPath' is set
|
||||
if (enumRefStringPath == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'enumRefStringPath' when calling PathApi->TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath");
|
||||
}
|
||||
|
||||
|
||||
@@ -337,17 +380,19 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
localVarRequestOptions.PathParameters.Add("path_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(pathString)); // path parameter
|
||||
localVarRequestOptions.PathParameters.Add("path_integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(pathInteger)); // path parameter
|
||||
localVarRequestOptions.PathParameters.Add("enum_nonref_string_path", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumNonrefStringPath)); // path parameter
|
||||
localVarRequestOptions.PathParameters.Add("enum_ref_string_path", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumRefStringPath)); // path parameter
|
||||
|
||||
localVarRequestOptions.Operation = "PathApi.TestsPathStringPathStringIntegerPathInteger";
|
||||
localVarRequestOptions.Operation = "PathApi.TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = await this.AsynchronousClient.GetAsync<string>("/path/string/{path_string}/integer/{path_integer}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
var localVarResponse = await this.AsynchronousClient.GetAsync<string>("/path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestsPathStringPathStringIntegerPathInteger", localVarResponse);
|
||||
Exception _exception = this.ExceptionFactory("TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
|
||||
@@ -34,10 +34,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// Test query parameter(s)
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="enumNonrefStringQuery"> (optional)</param>
|
||||
/// <param name="enumRefStringQuery"> (optional)</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>string</returns>
|
||||
string TestEnumRefString(StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0);
|
||||
string TestEnumRefString(string? enumNonrefStringQuery = default(string?), StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0);
|
||||
|
||||
/// <summary>
|
||||
/// Test query parameter(s)
|
||||
@@ -46,10 +47,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// Test query parameter(s)
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="enumNonrefStringQuery"> (optional)</param>
|
||||
/// <param name="enumRefStringQuery"> (optional)</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of string</returns>
|
||||
ApiResponse<string> TestEnumRefStringWithHttpInfo(StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0);
|
||||
ApiResponse<string> TestEnumRefStringWithHttpInfo(string? enumNonrefStringQuery = default(string?), StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0);
|
||||
/// <summary>
|
||||
/// Test query parameter(s)
|
||||
/// </summary>
|
||||
@@ -235,11 +237,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// Test query parameter(s)
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="enumNonrefStringQuery"> (optional)</param>
|
||||
/// <param name="enumRefStringQuery"> (optional)</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of string</returns>
|
||||
System.Threading.Tasks.Task<string> TestEnumRefStringAsync(StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
System.Threading.Tasks.Task<string> TestEnumRefStringAsync(string? enumNonrefStringQuery = default(string?), StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// Test query parameter(s)
|
||||
@@ -248,11 +251,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// Test query parameter(s)
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="enumNonrefStringQuery"> (optional)</param>
|
||||
/// <param name="enumRefStringQuery"> (optional)</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (string)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<string>> TestEnumRefStringWithHttpInfoAsync(StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
System.Threading.Tasks.Task<ApiResponse<string>> TestEnumRefStringWithHttpInfoAsync(string? enumNonrefStringQuery = default(string?), StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// Test query parameter(s)
|
||||
/// </summary>
|
||||
@@ -560,12 +564,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// Test query parameter(s) Test query parameter(s)
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="enumNonrefStringQuery"> (optional)</param>
|
||||
/// <param name="enumRefStringQuery"> (optional)</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>string</returns>
|
||||
public string TestEnumRefString(StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0)
|
||||
public string TestEnumRefString(string? enumNonrefStringQuery = default(string?), StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0)
|
||||
{
|
||||
Org.OpenAPITools.Client.ApiResponse<string> localVarResponse = TestEnumRefStringWithHttpInfo(enumRefStringQuery);
|
||||
Org.OpenAPITools.Client.ApiResponse<string> localVarResponse = TestEnumRefStringWithHttpInfo(enumNonrefStringQuery, enumRefStringQuery);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
@@ -573,10 +578,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// Test query parameter(s) Test query parameter(s)
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="enumNonrefStringQuery"> (optional)</param>
|
||||
/// <param name="enumRefStringQuery"> (optional)</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of string</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<string> TestEnumRefStringWithHttpInfo(StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0)
|
||||
public Org.OpenAPITools.Client.ApiResponse<string> TestEnumRefStringWithHttpInfo(string? enumNonrefStringQuery = default(string?), StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0)
|
||||
{
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
@@ -600,6 +606,10 @@ namespace Org.OpenAPITools.Api
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
if (enumNonrefStringQuery != null)
|
||||
{
|
||||
localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_nonref_string_query", enumNonrefStringQuery));
|
||||
}
|
||||
if (enumRefStringQuery != null)
|
||||
{
|
||||
localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_ref_string_query", enumRefStringQuery));
|
||||
@@ -627,13 +637,14 @@ namespace Org.OpenAPITools.Api
|
||||
/// Test query parameter(s) Test query parameter(s)
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="enumNonrefStringQuery"> (optional)</param>
|
||||
/// <param name="enumRefStringQuery"> (optional)</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of string</returns>
|
||||
public async System.Threading.Tasks.Task<string> TestEnumRefStringAsync(StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
public async System.Threading.Tasks.Task<string> TestEnumRefStringAsync(string? enumNonrefStringQuery = default(string?), StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
Org.OpenAPITools.Client.ApiResponse<string> localVarResponse = await TestEnumRefStringWithHttpInfoAsync(enumRefStringQuery, operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
Org.OpenAPITools.Client.ApiResponse<string> localVarResponse = await TestEnumRefStringWithHttpInfoAsync(enumNonrefStringQuery, enumRefStringQuery, operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
@@ -641,11 +652,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// Test query parameter(s) Test query parameter(s)
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="enumNonrefStringQuery"> (optional)</param>
|
||||
/// <param name="enumRefStringQuery"> (optional)</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (string)</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<string>> TestEnumRefStringWithHttpInfoAsync(StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<string>> TestEnumRefStringWithHttpInfoAsync(string? enumNonrefStringQuery = default(string?), StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
@@ -670,6 +682,10 @@ namespace Org.OpenAPITools.Api
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
if (enumNonrefStringQuery != null)
|
||||
{
|
||||
localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_nonref_string_query", enumNonrefStringQuery));
|
||||
}
|
||||
if (enumRefStringQuery != null)
|
||||
{
|
||||
localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_ref_string_query", enumRefStringQuery));
|
||||
|
||||
Reference in New Issue
Block a user