forked from loafle/openapi-generator-original
[python-nextgen] Fix enum query parameter (#15278)
* fix enum query parameter in python-nextgen * update samples
This commit is contained in:
@@ -4,6 +4,7 @@ All URIs are relative to *http://localhost:3000*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
| [**testEnumRefString**](QueryApi.md#testEnumRefString) | **GET** /query/enum_ref_string | Test query parameter(s) |
|
||||
| [**testQueryDatetimeDateString**](QueryApi.md#testQueryDatetimeDateString) | **GET** /query/datetime/date/string | Test query parameter(s) |
|
||||
| [**testQueryIntegerBooleanString**](QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s) |
|
||||
| [**testQueryStyleDeepObjectExplodeTrueObject**](QueryApi.md#testQueryStyleDeepObjectExplodeTrueObject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s) |
|
||||
@@ -13,6 +14,68 @@ All URIs are relative to *http://localhost:3000*
|
||||
| [**testQueryStyleFormExplodeTrueObjectAllOf**](QueryApi.md#testQueryStyleFormExplodeTrueObjectAllOf) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s) |
|
||||
|
||||
|
||||
<a name="testEnumRefString"></a>
|
||||
# **testEnumRefString**
|
||||
> String testEnumRefString(enumRefStringQuery)
|
||||
|
||||
Test query parameter(s)
|
||||
|
||||
Test query parameter(s)
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.QueryApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://localhost:3000");
|
||||
|
||||
QueryApi apiInstance = new QueryApi(defaultClient);
|
||||
StringEnumRef enumRefStringQuery = StringEnumRef.fromValue("success"); // StringEnumRef |
|
||||
try {
|
||||
String result = apiInstance.testEnumRefString(enumRefStringQuery);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling QueryApi#testEnumRefString");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **enumRefStringQuery** | [**StringEnumRef**](.md)| | [optional] [enum: success, failure, unclassified] |
|
||||
|
||||
### Return type
|
||||
|
||||
**String**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: text/plain
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Successful operation | - |
|
||||
|
||||
<a name="testQueryDatetimeDateString"></a>
|
||||
# **testQueryDatetimeDateString**
|
||||
> String testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery)
|
||||
|
||||
Reference in New Issue
Block a user