mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-19 15:37:08 +00:00
Codegen parameter for query json serialization (#21718)
* Add endpoints with query parameters that require Json-serialization * Add property for query json-serialization * Update samples * Adjust indentation for specification
This commit is contained in:
committed by
GitHub
parent
6ff9e67bad
commit
8874df4702
@@ -24,6 +24,8 @@ All URIs are relative to *http://localhost:3000*
|
||||
| [**testQueryStyleFormExplodeTrueObjectWithHttpInfo**](QueryApi.md#testQueryStyleFormExplodeTrueObjectWithHttpInfo) | **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) |
|
||||
| [**testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo**](QueryApi.md#testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s) |
|
||||
| [**testQueryStyleJsonSerializationObject**](QueryApi.md#testQueryStyleJsonSerializationObject) | **GET** /query/style_jsonSerialization/object | Test query parameter(s) |
|
||||
| [**testQueryStyleJsonSerializationObjectWithHttpInfo**](QueryApi.md#testQueryStyleJsonSerializationObjectWithHttpInfo) | **GET** /query/style_jsonSerialization/object | Test query parameter(s) |
|
||||
|
||||
|
||||
|
||||
@@ -1386,3 +1388,141 @@ No authorization required
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Successful operation | - |
|
||||
|
||||
|
||||
## testQueryStyleJsonSerializationObject
|
||||
|
||||
> String testQueryStyleJsonSerializationObject(jsonSerializedObjectRefStringQuery, jsonSerializedObjectArrayRefStringQuery)
|
||||
|
||||
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);
|
||||
Pet jsonSerializedObjectRefStringQuery = new Pet(); // Pet |
|
||||
List<Pet> jsonSerializedObjectArrayRefStringQuery = Arrays.asList(); // List<Pet> |
|
||||
try {
|
||||
String result = apiInstance.testQueryStyleJsonSerializationObject(jsonSerializedObjectRefStringQuery, jsonSerializedObjectArrayRefStringQuery);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling QueryApi#testQueryStyleJsonSerializationObject");
|
||||
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 |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **jsonSerializedObjectRefStringQuery** | [**Pet**](.md)| | [optional] |
|
||||
| **jsonSerializedObjectArrayRefStringQuery** | [**List<Pet>**](Pet.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 | - |
|
||||
|
||||
## testQueryStyleJsonSerializationObjectWithHttpInfo
|
||||
|
||||
> ApiResponse<String> testQueryStyleJsonSerializationObject testQueryStyleJsonSerializationObjectWithHttpInfo(jsonSerializedObjectRefStringQuery, jsonSerializedObjectArrayRefStringQuery)
|
||||
|
||||
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.ApiResponse;
|
||||
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);
|
||||
Pet jsonSerializedObjectRefStringQuery = new Pet(); // Pet |
|
||||
List<Pet> jsonSerializedObjectArrayRefStringQuery = Arrays.asList(); // List<Pet> |
|
||||
try {
|
||||
ApiResponse<String> response = apiInstance.testQueryStyleJsonSerializationObjectWithHttpInfo(jsonSerializedObjectRefStringQuery, jsonSerializedObjectArrayRefStringQuery);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
System.out.println("Response body: " + response.getData());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling QueryApi#testQueryStyleJsonSerializationObject");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **jsonSerializedObjectRefStringQuery** | [**Pet**](.md)| | [optional] |
|
||||
| **jsonSerializedObjectArrayRefStringQuery** | [**List<Pet>**](Pet.md)| | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
ApiResponse<**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