[python-nextgen] Fix enum query parameter (#15278)

* fix enum query parameter in python-nextgen

* update samples
This commit is contained in:
William Cheng
2023-04-22 16:08:59 +08:00
committed by GitHub
parent 33e0c6775f
commit b5745e6f26
32 changed files with 1431 additions and 19 deletions

View File

@@ -99,6 +99,29 @@ paths:
tags:
- header
x-accepts: text/plain
/query/enum_ref_string:
get:
description: Test query parameter(s)
operationId: test/enum_ref_string
parameters:
- explode: true
in: query
name: enum_ref_string_query
required: false
schema:
$ref: '#/components/schemas/StringEnumRef'
style: form
responses:
"200":
content:
text/plain:
schema:
type: string
description: Successful operation
summary: Test query parameter(s)
tags:
- query
x-accepts: text/plain
/query/datetime/date/string:
get:
description: Test query parameter(s)

View File

@@ -8,6 +8,7 @@ import org.openapitools.client.model.DataQuery;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import org.openapitools.client.model.Pet;
import org.openapitools.client.model.StringEnumRef;
import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter;
import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter;
@@ -21,6 +22,83 @@ import feign.*;
public interface QueryApi extends ApiClient.Api {
/**
* Test query parameter(s)
* Test query parameter(s)
* @param enumRefStringQuery (optional)
* @return String
*/
@RequestLine("GET /query/enum_ref_string?enum_ref_string_query={enumRefStringQuery}")
@Headers({
"Accept: text/plain",
})
String testEnumRefString(@Param("enumRefStringQuery") StringEnumRef enumRefStringQuery);
/**
* Test query parameter(s)
* Similar to <code>testEnumRefString</code> but it also returns the http response headers .
* Test query parameter(s)
* @param enumRefStringQuery (optional)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /query/enum_ref_string?enum_ref_string_query={enumRefStringQuery}")
@Headers({
"Accept: text/plain",
})
ApiResponse<String> testEnumRefStringWithHttpInfo(@Param("enumRefStringQuery") StringEnumRef enumRefStringQuery);
/**
* Test query parameter(s)
* Test query parameter(s)
* Note, this is equivalent to the other <code>testEnumRefString</code> method,
* but with the query parameters collected into a single Map parameter. This
* is convenient for services with optional query parameters, especially when
* used with the {@link TestEnumRefStringQueryParams} class that allows for
* building up this map in a fluent style.
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
* <li>enumRefStringQuery - (optional)</li>
* </ul>
* @return String
*/
@RequestLine("GET /query/enum_ref_string?enum_ref_string_query={enumRefStringQuery}")
@Headers({
"Accept: text/plain",
})
String testEnumRefString(@QueryMap(encoded=true) TestEnumRefStringQueryParams queryParams);
/**
* Test query parameter(s)
* Test query parameter(s)
* Note, this is equivalent to the other <code>testEnumRefString</code> that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
* <li>enumRefStringQuery - (optional)</li>
* </ul>
* @return String
*/
@RequestLine("GET /query/enum_ref_string?enum_ref_string_query={enumRefStringQuery}")
@Headers({
"Accept: text/plain",
})
ApiResponse<String> testEnumRefStringWithHttpInfo(@QueryMap(encoded=true) TestEnumRefStringQueryParams queryParams);
/**
* A convenience class for generating query parameters for the
* <code>testEnumRefString</code> method in a fluent style.
*/
public static class TestEnumRefStringQueryParams extends HashMap<String, Object> {
public TestEnumRefStringQueryParams enumRefStringQuery(final StringEnumRef value) {
put("enum_ref_string_query", EncodingUtils.encode(value));
return this;
}
}
/**
* Test query parameter(s)
* Test query parameter(s)