mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-03 00:43:46 +00:00
[Java][native][apache-httpclient] Update toUrlQueryString to support form style for object (#14478)
* update toUrlQueryString * add new files * minor bug fixes * support object in query parameter - java apache httpclient * rename variable - java native * update samples * fix try catch
This commit is contained in:
15
samples/client/echo_api/java/okhttp-gson/docs/DataQuery.md
Normal file
15
samples/client/echo_api/java/okhttp-gson/docs/DataQuery.md
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
# DataQuery
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**suffix** | **String** | test suffix | [optional] |
|
||||
|**text** | **String** | Some text containing white spaces | [optional] |
|
||||
|**date** | **OffsetDateTime** | A date | [optional] |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
# DataQueryAllOf
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**suffix** | **String** | test suffix | [optional] |
|
||||
|**text** | **String** | Some text containing white spaces | [optional] |
|
||||
|**date** | **OffsetDateTime** | A date | [optional] |
|
||||
|
||||
|
||||
|
||||
24
samples/client/echo_api/java/okhttp-gson/docs/Query.md
Normal file
24
samples/client/echo_api/java/okhttp-gson/docs/Query.md
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
|
||||
# Query
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**id** | **Long** | Query | [optional] |
|
||||
|**outcomes** | [**List<OutcomesEnum>**](#List<OutcomesEnum>) | | [optional] |
|
||||
|
||||
|
||||
|
||||
## Enum: List<OutcomesEnum>
|
||||
|
||||
| Name | Value |
|
||||
|---- | -----|
|
||||
| SUCCESS | "SUCCESS" |
|
||||
| FAILURE | "FAILURE" |
|
||||
| SKIPPED | "SKIPPED" |
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ All URIs are relative to *http://localhost:3000*
|
||||
| [**testQueryStyleDeepObjectExplodeTrueObjectAllOf**](QueryApi.md#testQueryStyleDeepObjectExplodeTrueObjectAllOf) | **GET** /query/style_deepObject/explode_true/object/allOf | Test query parameter(s) |
|
||||
| [**testQueryStyleFormExplodeTrueArrayString**](QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) |
|
||||
| [**testQueryStyleFormExplodeTrueObject**](QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s) |
|
||||
| [**testQueryStyleFormExplodeTrueObjectAllOf**](QueryApi.md#testQueryStyleFormExplodeTrueObjectAllOf) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s) |
|
||||
|
||||
|
||||
<a name="testQueryIntegerBooleanString"></a>
|
||||
@@ -325,3 +326,65 @@ No authorization required
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Successful operation | - |
|
||||
|
||||
<a name="testQueryStyleFormExplodeTrueObjectAllOf"></a>
|
||||
# **testQueryStyleFormExplodeTrueObjectAllOf**
|
||||
> String testQueryStyleFormExplodeTrueObjectAllOf(queryObject)
|
||||
|
||||
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);
|
||||
DataQuery queryObject = new DataQuery(); // DataQuery |
|
||||
try {
|
||||
String result = apiInstance.testQueryStyleFormExplodeTrueObjectAllOf(queryObject);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling QueryApi#testQueryStyleFormExplodeTrueObjectAllOf");
|
||||
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 |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **queryObject** | [**DataQuery**](.md)| | [optional] |
|
||||
|
||||
### 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 | - |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user