Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add map property in url params #10154

Merged
merged 2 commits into from
Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,14 @@ paths:
type: array
items:
type: string
- name: language
in: query
required: false
schema:
type: object
additionalProperties:
type: string
format: string
responses:
"200":
description: Success
Expand Down
6 changes: 4 additions & 2 deletions samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ No authorization required

## TestQueryParameterCollectionFormat

> void TestQueryParameterCollectionFormat (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context)
> void TestQueryParameterCollectionFormat (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, Dictionary<string, string> language = null)



Expand Down Expand Up @@ -1307,10 +1307,11 @@ namespace Example
var http = new List<string>(); // List<string> |
var url = new List<string>(); // List<string> |
var context = new List<string>(); // List<string> |
var language = new Dictionary<string, string>(); // Dictionary<string, string> | (optional)

try
{
apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, language);
}
catch (ApiException e)
{
Expand All @@ -1333,6 +1334,7 @@ Name | Type | Description | Notes
**http** | [**List&lt;string&gt;**](string.md)| |
**url** | [**List&lt;string&gt;**](string.md)| |
**context** | [**List&lt;string&gt;**](string.md)| |
**language** | [**Dictionary&lt;string, string&gt;**](string.md)| | [optional]

### Return type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,9 @@ public interface IFakeApi : IApiAccessor
/// <param name="http"></param>
/// <param name="url"></param>
/// <param name="context"></param>
/// <param name="language"> (optional)</param>
/// <returns></returns>
void TestQueryParameterCollectionFormat (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context);
void TestQueryParameterCollectionFormat (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, Dictionary<string, string> language = default(Dictionary<string, string>));

/// <summary>
///
Expand All @@ -444,8 +445,9 @@ public interface IFakeApi : IApiAccessor
/// <param name="http"></param>
/// <param name="url"></param>
/// <param name="context"></param>
/// <param name="language"> (optional)</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);
ApiResponse<Object> TestQueryParameterCollectionFormatWithHttpInfo (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, Dictionary<string, string> language = default(Dictionary<string, string>));
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
Expand Down Expand Up @@ -884,9 +886,10 @@ public interface IFakeApi : IApiAccessor
/// <param name="http"></param>
/// <param name="url"></param>
/// <param name="context"></param>
/// <param name="language"> (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, CancellationToken cancellationToken = default(CancellationToken));
System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, Dictionary<string, string> language = default(Dictionary<string, string>), CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
///
Expand All @@ -900,9 +903,10 @@ public interface IFakeApi : IApiAccessor
/// <param name="http"></param>
/// <param name="url"></param>
/// <param name="context"></param>
/// <param name="language"> (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel request (optional) </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, CancellationToken cancellationToken = default(CancellationToken));
System.Threading.Tasks.Task<ApiResponse<Object>> TestQueryParameterCollectionFormatWithHttpInfoAsync (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, Dictionary<string, string> language = default(Dictionary<string, string>), CancellationToken cancellationToken = default(CancellationToken));
#endregion Asynchronous Operations
}

Expand Down Expand Up @@ -3531,10 +3535,11 @@ public ApiResponse<Object> TestJsonFormDataWithHttpInfo (string param, string pa
/// <param name="http"></param>
/// <param name="url"></param>
/// <param name="context"></param>
/// <param name="language"> (optional)</param>
/// <returns></returns>
public void TestQueryParameterCollectionFormat (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context)
public void TestQueryParameterCollectionFormat (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, Dictionary<string, string> language = default(Dictionary<string, string>))
{
TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context);
TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, language);
}

/// <summary>
Expand All @@ -3546,8 +3551,9 @@ public void TestQueryParameterCollectionFormat (List<string> pipe, List<string>
/// <param name="http"></param>
/// <param name="url"></param>
/// <param name="context"></param>
/// <param name="language"> (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
public ApiResponse<Object> TestQueryParameterCollectionFormatWithHttpInfo (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context)
public ApiResponse<Object> TestQueryParameterCollectionFormatWithHttpInfo (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, Dictionary<string, string> language = default(Dictionary<string, string>))
{
// verify the required parameter 'pipe' is set
if (pipe == null)
Expand Down Expand Up @@ -3590,6 +3596,7 @@ public ApiResponse<Object> TestQueryParameterCollectionFormatWithHttpInfo (List<
if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("ssv", "http", http)); // query parameter
if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter
if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter
if (language != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "language", language)); // query parameter


// make the HTTP request
Expand Down Expand Up @@ -3619,11 +3626,12 @@ public ApiResponse<Object> TestQueryParameterCollectionFormatWithHttpInfo (List<
/// <param name="http"></param>
/// <param name="url"></param>
/// <param name="context"></param>
/// <param name="language"> (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, CancellationToken cancellationToken = default(CancellationToken))
public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, Dictionary<string, string> language = default(Dictionary<string, string>), CancellationToken cancellationToken = default(CancellationToken))
{
await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, cancellationToken);
await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, language, cancellationToken);

}

Expand All @@ -3636,9 +3644,10 @@ public ApiResponse<Object> TestQueryParameterCollectionFormatWithHttpInfo (List<
/// <param name="http"></param>
/// <param name="url"></param>
/// <param name="context"></param>
/// <param name="language"> (optional)</param>
/// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<ApiResponse<Object>> TestQueryParameterCollectionFormatWithHttpInfoAsync (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, CancellationToken cancellationToken = default(CancellationToken))
public async System.Threading.Tasks.Task<ApiResponse<Object>> TestQueryParameterCollectionFormatWithHttpInfoAsync (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, Dictionary<string, string> language = default(Dictionary<string, string>), CancellationToken cancellationToken = default(CancellationToken))
{
// verify the required parameter 'pipe' is set
if (pipe == null)
Expand Down Expand Up @@ -3681,6 +3690,7 @@ public ApiResponse<Object> TestQueryParameterCollectionFormatWithHttpInfo (List<
if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("ssv", "http", http)); // query parameter
if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter
if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter
if (language != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "language", language)); // query parameter


// make the HTTP request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,13 +528,17 @@ defmodule OpenapiPetstore.Api.Fake do
- url ([String.t]):
- context ([String.t]):
- opts (KeywordList): [optional] Optional parameters
- :language (%{optional(String.t) => String.t}):
## Returns

{:ok, nil} on success
{:error, Tesla.Env.t} on failure
"""
@spec test_query_parameter_collection_format(Tesla.Env.client, list(String.t), list(String.t), list(String.t), list(String.t), list(String.t), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t}
def test_query_parameter_collection_format(connection, pipe, ioutil, http, url, context, _opts \\ []) do
def test_query_parameter_collection_format(connection, pipe, ioutil, http, url, context, opts \\ []) do
optional_params = %{
:"language" => :query
}
%{}
|> method(:put)
|> url("/fake/test-query-paramters")
Expand All @@ -543,6 +547,7 @@ defmodule OpenapiPetstore.Api.Fake do
|> add_param(:query, :"http", http)
|> add_param(:query, :"url", url)
|> add_param(:query, :"context", context)
|> add_optional_params(optional_params, opts)
|> ensure_body()
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
Expand Down
10 changes: 10 additions & 0 deletions samples/client/petstore/java/feign/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,16 @@ paths:
type: string
type: array
style: form
- explode: true
in: query
name: language
required: false
schema:
additionalProperties:
format: string
type: string
type: object
style: form
responses:
"200":
description: Success
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,12 +438,13 @@ public TestGroupParametersQueryParams int64Group(final Long value) {
* @param http (required)
* @param url (required)
* @param context (required)
* @param language (optional)
*/
@RequestLine("PUT /fake/test-query-paramters?pipe={pipe}&ioutil={ioutil}&http={http}&url={url}&context={context}")
@RequestLine("PUT /fake/test-query-paramters?pipe={pipe}&ioutil={ioutil}&http={http}&url={url}&context={context}&language={language}")
@Headers({
"Accept: application/json",
})
void testQueryParameterCollectionFormat(@Param("pipe") List<String> pipe, @Param("ioutil") List<String> ioutil, @Param("http") List<String> http, @Param("url") List<String> url, @Param("context") List<String> context);
void testQueryParameterCollectionFormat(@Param("pipe") List<String> pipe, @Param("ioutil") List<String> ioutil, @Param("http") List<String> http, @Param("url") List<String> url, @Param("context") List<String> context, @Param("language") Map<String, String> language);

/**
*
Expand All @@ -461,9 +462,10 @@ public TestGroupParametersQueryParams int64Group(final Long value) {
* <li>http - (required)</li>
* <li>url - (required)</li>
* <li>context - (required)</li>
* <li>language - (optional)</li>
* </ul>
*/
@RequestLine("PUT /fake/test-query-paramters?pipe={pipe}&ioutil={ioutil}&http={http}&url={url}&context={context}")
@RequestLine("PUT /fake/test-query-paramters?pipe={pipe}&ioutil={ioutil}&http={http}&url={url}&context={context}&language={language}")
@Headers({
"Accept: application/json",
})
Expand Down Expand Up @@ -494,5 +496,9 @@ public TestQueryParameterCollectionFormatQueryParams context(final List<String>
put("context", EncodingUtils.encodeCollection(value, "multi"));
return this;
}
public TestQueryParameterCollectionFormatQueryParams language(final Map<String, String> value) {
put("language", EncodingUtils.encode(value));
return this;
}
}
}
10 changes: 10 additions & 0 deletions samples/client/petstore/java/webclient/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,16 @@ paths:
type: string
type: array
style: form
- explode: true
in: query
name: language
required: false
schema:
additionalProperties:
format: string
type: string
type: object
style: form
responses:
"200":
description: Success
Expand Down
6 changes: 4 additions & 2 deletions samples/client/petstore/java/webclient/docs/FakeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@ No authorization required

## testQueryParameterCollectionFormat

> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context)
> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, language)



Expand All @@ -1159,8 +1159,9 @@ public class Example {
List<String> http = Arrays.asList(); // List<String> |
List<String> url = Arrays.asList(); // List<String> |
List<String> context = Arrays.asList(); // List<String> |
Map<String, String> language = new HashMap(); // Map<String, String> |
try {
apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, language);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat");
System.err.println("Status code: " + e.getCode());
Expand All @@ -1182,6 +1183,7 @@ Name | Type | Description | Notes
**http** | [**List&lt;String&gt;**](String.md)| |
**url** | [**List&lt;String&gt;**](String.md)| |
**context** | [**List&lt;String&gt;**](String.md)| |
**language** | [**Map&lt;String, String&gt;**](String.md)| | [optional]

### Return type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1016,9 +1016,10 @@ public Mono<ResponseEntity<Void>> testJsonFormDataWithHttpInfo(String param, Str
* @param http The http parameter
* @param url The url parameter
* @param context The context parameter
* @param language The language parameter
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec testQueryParameterCollectionFormatRequestCreation(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context) throws WebClientResponseException {
private ResponseSpec testQueryParameterCollectionFormatRequestCreation(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context, Map<String, String> language) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'pipe' is set
if (pipe == null) {
Expand Down Expand Up @@ -1053,6 +1054,7 @@ private ResponseSpec testQueryParameterCollectionFormatRequestCreation(List<Stri
queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("ssv".toUpperCase(Locale.ROOT)), "http", http));
queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "url", url));
queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("multi".toUpperCase(Locale.ROOT)), "context", context));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "language", language));

final String[] localVarAccepts = { };
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
Expand All @@ -1074,15 +1076,16 @@ private ResponseSpec testQueryParameterCollectionFormatRequestCreation(List<Stri
* @param http The http parameter
* @param url The url parameter
* @param context The context parameter
* @param language The language parameter
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<Void> testQueryParameterCollectionFormat(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context) throws WebClientResponseException {
public Mono<Void> testQueryParameterCollectionFormat(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context, Map<String, String> language) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return testQueryParameterCollectionFormatRequestCreation(pipe, ioutil, http, url, context).bodyToMono(localVarReturnType);
return testQueryParameterCollectionFormatRequestCreation(pipe, ioutil, http, url, context, language).bodyToMono(localVarReturnType);
}

public Mono<ResponseEntity<Void>> testQueryParameterCollectionFormatWithHttpInfo(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context) throws WebClientResponseException {
public Mono<ResponseEntity<Void>> testQueryParameterCollectionFormatWithHttpInfo(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context, Map<String, String> language) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return testQueryParameterCollectionFormatRequestCreation(pipe, ioutil, http, url, context).toEntity(localVarReturnType);
return testQueryParameterCollectionFormatRequestCreation(pipe, ioutil, http, url, context, language).toEntity(localVarReturnType);
}
}
Loading