mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-06 08:36:10 +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
@@ -139,6 +139,7 @@ Class | Method | HTTP request | Description
|
||||
*QueryApi* | [**testQueryStyleFormExplodeTrueArrayString**](docs/QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s)
|
||||
*QueryApi* | [**testQueryStyleFormExplodeTrueObject**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s)
|
||||
*QueryApi* | [**testQueryStyleFormExplodeTrueObjectAllOf**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObjectAllOf) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s)
|
||||
*QueryApi* | [**testQueryStyleJsonSerializationObject**](docs/QueryApi.md#testQueryStyleJsonSerializationObject) | **GET** /query/style_jsonSerialization/object | Test query parameter(s)
|
||||
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
@@ -467,6 +467,39 @@ paths:
|
||||
- query
|
||||
x-accepts:
|
||||
- text/plain
|
||||
/query/style_jsonSerialization/object:
|
||||
get:
|
||||
description: Test query parameter(s)
|
||||
operationId: test/query/style_jsonSerialization/object
|
||||
parameters:
|
||||
- content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
in: query
|
||||
name: json_serialized_object_ref_string_query
|
||||
required: false
|
||||
- content:
|
||||
application/json:
|
||||
schema:
|
||||
items:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
type: array
|
||||
in: query
|
||||
name: json_serialized_object_array_ref_string_query
|
||||
required: false
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
description: Successful operation
|
||||
summary: Test query parameter(s)
|
||||
tags:
|
||||
- query
|
||||
x-accepts:
|
||||
- text/plain
|
||||
/body/application/octetstream/binary:
|
||||
post:
|
||||
description: Test body parameter(s)
|
||||
|
||||
@@ -14,6 +14,7 @@ All URIs are relative to *http://localhost:3000*
|
||||
| [**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) |
|
||||
| [**testQueryStyleJsonSerializationObject**](QueryApi.md#testQueryStyleJsonSerializationObject) | **GET** /query/style_jsonSerialization/object | Test query parameter(s) |
|
||||
|
||||
|
||||
|
||||
@@ -686,3 +687,71 @@ 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 | - |
|
||||
|
||||
|
||||
@@ -739,6 +739,79 @@ public class QueryApi extends BaseApi {
|
||||
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"text/plain"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
TypeReference<String> localVarReturnType = new TypeReference<String>() {};
|
||||
return apiClient.invokeAPI(
|
||||
localVarPath,
|
||||
"GET",
|
||||
localVarQueryParams,
|
||||
localVarCollectionQueryParams,
|
||||
localVarQueryStringJoiner.toString(),
|
||||
localVarPostBody,
|
||||
localVarHeaderParams,
|
||||
localVarCookieParams,
|
||||
localVarFormParams,
|
||||
localVarAccept,
|
||||
localVarContentType,
|
||||
localVarAuthNames,
|
||||
localVarReturnType
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param jsonSerializedObjectRefStringQuery (optional)
|
||||
* @param jsonSerializedObjectArrayRefStringQuery (optional)
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleJsonSerializationObject(@javax.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @javax.annotation.Nullable List<Pet> jsonSerializedObjectArrayRefStringQuery) throws ApiException {
|
||||
return this.testQueryStyleJsonSerializationObject(jsonSerializedObjectRefStringQuery, jsonSerializedObjectArrayRefStringQuery, Collections.emptyMap());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param jsonSerializedObjectRefStringQuery (optional)
|
||||
* @param jsonSerializedObjectArrayRefStringQuery (optional)
|
||||
* @param additionalHeaders additionalHeaders for this call
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleJsonSerializationObject(@javax.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @javax.annotation.Nullable List<Pet> jsonSerializedObjectArrayRefStringQuery, Map<String, String> additionalHeaders) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/query/style_jsonSerialization/object";
|
||||
|
||||
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
|
||||
String localVarQueryParameterBaseName;
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
localVarQueryParams.addAll(apiClient.parameterToPair("json_serialized_object_ref_string_query", jsonSerializedObjectRefStringQuery));
|
||||
localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "json_serialized_object_array_ref_string_query", jsonSerializedObjectArrayRefStringQuery));
|
||||
|
||||
localVarHeaderParams.putAll(additionalHeaders);
|
||||
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"text/plain"
|
||||
};
|
||||
|
||||
@@ -467,6 +467,39 @@ paths:
|
||||
- query
|
||||
x-accepts:
|
||||
- text/plain
|
||||
/query/style_jsonSerialization/object:
|
||||
get:
|
||||
description: Test query parameter(s)
|
||||
operationId: test/query/style_jsonSerialization/object
|
||||
parameters:
|
||||
- content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
in: query
|
||||
name: json_serialized_object_ref_string_query
|
||||
required: false
|
||||
- content:
|
||||
application/json:
|
||||
schema:
|
||||
items:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
type: array
|
||||
in: query
|
||||
name: json_serialized_object_array_ref_string_query
|
||||
required: false
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
description: Successful operation
|
||||
summary: Test query parameter(s)
|
||||
tags:
|
||||
- query
|
||||
x-accepts:
|
||||
- text/plain
|
||||
/body/application/octetstream/binary:
|
||||
post:
|
||||
description: Test body parameter(s)
|
||||
|
||||
@@ -831,4 +831,89 @@ public interface QueryApi extends ApiClient.Api {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param jsonSerializedObjectRefStringQuery (optional)
|
||||
* @param jsonSerializedObjectArrayRefStringQuery (optional)
|
||||
* @return String
|
||||
*/
|
||||
@RequestLine("GET /query/style_jsonSerialization/object?json_serialized_object_ref_string_query={jsonSerializedObjectRefStringQuery}&json_serialized_object_array_ref_string_query={jsonSerializedObjectArrayRefStringQuery}")
|
||||
@Headers({
|
||||
"Accept: text/plain",
|
||||
})
|
||||
String testQueryStyleJsonSerializationObject(@Param("jsonSerializedObjectRefStringQuery") @javax.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @Param("jsonSerializedObjectArrayRefStringQuery") @javax.annotation.Nullable List<Pet> jsonSerializedObjectArrayRefStringQuery);
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Similar to <code>testQueryStyleJsonSerializationObject</code> but it also returns the http response headers .
|
||||
* Test query parameter(s)
|
||||
* @param jsonSerializedObjectRefStringQuery (optional)
|
||||
* @param jsonSerializedObjectArrayRefStringQuery (optional)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("GET /query/style_jsonSerialization/object?json_serialized_object_ref_string_query={jsonSerializedObjectRefStringQuery}&json_serialized_object_array_ref_string_query={jsonSerializedObjectArrayRefStringQuery}")
|
||||
@Headers({
|
||||
"Accept: text/plain",
|
||||
})
|
||||
ApiResponse<String> testQueryStyleJsonSerializationObjectWithHttpInfo(@Param("jsonSerializedObjectRefStringQuery") @javax.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @Param("jsonSerializedObjectArrayRefStringQuery") @javax.annotation.Nullable List<Pet> jsonSerializedObjectArrayRefStringQuery);
|
||||
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* Note, this is equivalent to the other <code>testQueryStyleJsonSerializationObject</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 TestQueryStyleJsonSerializationObjectQueryParams} 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>jsonSerializedObjectRefStringQuery - (optional)</li>
|
||||
* <li>jsonSerializedObjectArrayRefStringQuery - (optional)</li>
|
||||
* </ul>
|
||||
* @return String
|
||||
*/
|
||||
@RequestLine("GET /query/style_jsonSerialization/object?json_serialized_object_ref_string_query={jsonSerializedObjectRefStringQuery}&json_serialized_object_array_ref_string_query={jsonSerializedObjectArrayRefStringQuery}")
|
||||
@Headers({
|
||||
"Accept: text/plain",
|
||||
})
|
||||
String testQueryStyleJsonSerializationObject(@QueryMap(encoded=true) TestQueryStyleJsonSerializationObjectQueryParams queryParams);
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* Note, this is equivalent to the other <code>testQueryStyleJsonSerializationObject</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>jsonSerializedObjectRefStringQuery - (optional)</li>
|
||||
* <li>jsonSerializedObjectArrayRefStringQuery - (optional)</li>
|
||||
* </ul>
|
||||
* @return String
|
||||
*/
|
||||
@RequestLine("GET /query/style_jsonSerialization/object?json_serialized_object_ref_string_query={jsonSerializedObjectRefStringQuery}&json_serialized_object_array_ref_string_query={jsonSerializedObjectArrayRefStringQuery}")
|
||||
@Headers({
|
||||
"Accept: text/plain",
|
||||
})
|
||||
ApiResponse<String> testQueryStyleJsonSerializationObjectWithHttpInfo(@QueryMap(encoded=true) TestQueryStyleJsonSerializationObjectQueryParams queryParams);
|
||||
|
||||
|
||||
/**
|
||||
* A convenience class for generating query parameters for the
|
||||
* <code>testQueryStyleJsonSerializationObject</code> method in a fluent style.
|
||||
*/
|
||||
public static class TestQueryStyleJsonSerializationObjectQueryParams extends HashMap<String, Object> {
|
||||
public TestQueryStyleJsonSerializationObjectQueryParams jsonSerializedObjectRefStringQuery(@javax.annotation.Nullable final Pet value) {
|
||||
put("json_serialized_object_ref_string_query", EncodingUtils.encode(value));
|
||||
return this;
|
||||
}
|
||||
public TestQueryStyleJsonSerializationObjectQueryParams jsonSerializedObjectArrayRefStringQuery(@javax.annotation.Nullable final List<Pet> value) {
|
||||
put("json_serialized_object_array_ref_string_query", EncodingUtils.encodeCollection(value, "csv"));
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,6 +160,8 @@ Class | Method | HTTP request | Description
|
||||
*QueryApi* | [**testQueryStyleFormExplodeTrueObjectWithHttpInfo**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObjectWithHttpInfo) | **GET** /query/style_form/explode_true/object | Test query parameter(s)
|
||||
*QueryApi* | [**testQueryStyleFormExplodeTrueObjectAllOf**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObjectAllOf) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s)
|
||||
*QueryApi* | [**testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s)
|
||||
*QueryApi* | [**testQueryStyleJsonSerializationObject**](docs/QueryApi.md#testQueryStyleJsonSerializationObject) | **GET** /query/style_jsonSerialization/object | Test query parameter(s)
|
||||
*QueryApi* | [**testQueryStyleJsonSerializationObjectWithHttpInfo**](docs/QueryApi.md#testQueryStyleJsonSerializationObjectWithHttpInfo) | **GET** /query/style_jsonSerialization/object | Test query parameter(s)
|
||||
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
@@ -467,6 +467,39 @@ paths:
|
||||
- query
|
||||
x-accepts:
|
||||
- text/plain
|
||||
/query/style_jsonSerialization/object:
|
||||
get:
|
||||
description: Test query parameter(s)
|
||||
operationId: test/query/style_jsonSerialization/object
|
||||
parameters:
|
||||
- content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
in: query
|
||||
name: json_serialized_object_ref_string_query
|
||||
required: false
|
||||
- content:
|
||||
application/json:
|
||||
schema:
|
||||
items:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
type: array
|
||||
in: query
|
||||
name: json_serialized_object_array_ref_string_query
|
||||
required: false
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
description: Successful operation
|
||||
summary: Test query parameter(s)
|
||||
tags:
|
||||
- query
|
||||
x-accepts:
|
||||
- text/plain
|
||||
/body/application/octetstream/binary:
|
||||
post:
|
||||
description: Test body parameter(s)
|
||||
|
||||
@@ -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 | - |
|
||||
|
||||
|
||||
@@ -1378,4 +1378,127 @@ public class QueryApi {
|
||||
return localVarRequestBuilder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param jsonSerializedObjectRefStringQuery (optional)
|
||||
* @param jsonSerializedObjectArrayRefStringQuery (optional)
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleJsonSerializationObject(@javax.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @javax.annotation.Nullable List<Pet> jsonSerializedObjectArrayRefStringQuery) throws ApiException {
|
||||
return testQueryStyleJsonSerializationObject(jsonSerializedObjectRefStringQuery, jsonSerializedObjectArrayRefStringQuery, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param jsonSerializedObjectRefStringQuery (optional)
|
||||
* @param jsonSerializedObjectArrayRefStringQuery (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleJsonSerializationObject(@javax.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @javax.annotation.Nullable List<Pet> jsonSerializedObjectArrayRefStringQuery, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryStyleJsonSerializationObjectWithHttpInfo(jsonSerializedObjectRefStringQuery, jsonSerializedObjectArrayRefStringQuery, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param jsonSerializedObjectRefStringQuery (optional)
|
||||
* @param jsonSerializedObjectArrayRefStringQuery (optional)
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryStyleJsonSerializationObjectWithHttpInfo(@javax.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @javax.annotation.Nullable List<Pet> jsonSerializedObjectArrayRefStringQuery) throws ApiException {
|
||||
return testQueryStyleJsonSerializationObjectWithHttpInfo(jsonSerializedObjectRefStringQuery, jsonSerializedObjectArrayRefStringQuery, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param jsonSerializedObjectRefStringQuery (optional)
|
||||
* @param jsonSerializedObjectArrayRefStringQuery (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryStyleJsonSerializationObjectWithHttpInfo(@javax.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @javax.annotation.Nullable List<Pet> jsonSerializedObjectArrayRefStringQuery, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryStyleJsonSerializationObjectRequestBuilder(jsonSerializedObjectRefStringQuery, jsonSerializedObjectArrayRefStringQuery, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofInputStream());
|
||||
if (memberVarResponseInterceptor != null) {
|
||||
memberVarResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
try {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
throw getApiException("testQueryStyleJsonSerializationObject", localVarResponse);
|
||||
}
|
||||
// for plain text response
|
||||
if (localVarResponse.headers().map().containsKey("Content-Type") &&
|
||||
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0).split(";")[0].trim())) {
|
||||
java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A");
|
||||
String responseBodyText = s.hasNext() ? s.next() : "";
|
||||
return new ApiResponse<String>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
responseBodyText
|
||||
);
|
||||
} else {
|
||||
throw new RuntimeException("Error! The response Content-Type is supposed to be `text/plain` but it's not: " + localVarResponse);
|
||||
}
|
||||
} finally {
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new ApiException(e);
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw new ApiException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testQueryStyleJsonSerializationObjectRequestBuilder(@javax.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @javax.annotation.Nullable List<Pet> jsonSerializedObjectArrayRefStringQuery, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
String localVarPath = "/query/style_jsonSerialization/object";
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
|
||||
String localVarQueryParameterBaseName;
|
||||
localVarQueryParameterBaseName = "json_serialized_object_ref_string_query";
|
||||
localVarQueryParams.addAll(ApiClient.parameterToPairs("json_serialized_object_ref_string_query", jsonSerializedObjectRefStringQuery));
|
||||
localVarQueryParameterBaseName = "json_serialized_object_array_ref_string_query";
|
||||
localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "json_serialized_object_array_ref_string_query", jsonSerializedObjectArrayRefStringQuery));
|
||||
|
||||
if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) {
|
||||
StringJoiner queryJoiner = new StringJoiner("&");
|
||||
localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue()));
|
||||
if (localVarQueryStringJoiner.length() != 0) {
|
||||
queryJoiner.add(localVarQueryStringJoiner.toString());
|
||||
}
|
||||
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString()));
|
||||
} else {
|
||||
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
|
||||
}
|
||||
|
||||
localVarRequestBuilder.header("Accept", "text/plain");
|
||||
|
||||
localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
return localVarRequestBuilder;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -146,6 +146,7 @@ Class | Method | HTTP request | Description
|
||||
*QueryApi* | [**testQueryStyleFormExplodeTrueArrayString**](docs/QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s)
|
||||
*QueryApi* | [**testQueryStyleFormExplodeTrueObject**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s)
|
||||
*QueryApi* | [**testQueryStyleFormExplodeTrueObjectAllOf**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObjectAllOf) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s)
|
||||
*QueryApi* | [**testQueryStyleJsonSerializationObject**](docs/QueryApi.md#testQueryStyleJsonSerializationObject) | **GET** /query/style_jsonSerialization/object | Test query parameter(s)
|
||||
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
@@ -467,6 +467,39 @@ paths:
|
||||
- query
|
||||
x-accepts:
|
||||
- text/plain
|
||||
/query/style_jsonSerialization/object:
|
||||
get:
|
||||
description: Test query parameter(s)
|
||||
operationId: test/query/style_jsonSerialization/object
|
||||
parameters:
|
||||
- content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
in: query
|
||||
name: json_serialized_object_ref_string_query
|
||||
required: false
|
||||
- content:
|
||||
application/json:
|
||||
schema:
|
||||
items:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
type: array
|
||||
in: query
|
||||
name: json_serialized_object_array_ref_string_query
|
||||
required: false
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
description: Successful operation
|
||||
summary: Test query parameter(s)
|
||||
tags:
|
||||
- query
|
||||
x-accepts:
|
||||
- text/plain
|
||||
/body/application/octetstream/binary:
|
||||
post:
|
||||
description: Test body parameter(s)
|
||||
|
||||
@@ -14,6 +14,7 @@ All URIs are relative to *http://localhost:3000*
|
||||
| [**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) |
|
||||
| [**testQueryStyleJsonSerializationObject**](QueryApi.md#testQueryStyleJsonSerializationObject) | **GET** /query/style_jsonSerialization/object | Test query parameter(s) |
|
||||
|
||||
|
||||
<a id="testEnumRefString"></a>
|
||||
@@ -646,3 +647,67 @@ No authorization required
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Successful operation | - |
|
||||
|
||||
<a id="testQueryStyleJsonSerializationObject"></a>
|
||||
# **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 | - |
|
||||
|
||||
|
||||
@@ -1368,4 +1368,137 @@ public class QueryApi {
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for testQueryStyleJsonSerializationObject
|
||||
* @param jsonSerializedObjectRefStringQuery (optional)
|
||||
* @param jsonSerializedObjectArrayRefStringQuery (optional)
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
* @http.response.details
|
||||
<table border="1">
|
||||
<caption>Response Details</caption>
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 200 </td><td> Successful operation </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public okhttp3.Call testQueryStyleJsonSerializationObjectCall(@javax.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @javax.annotation.Nullable List<Pet> jsonSerializedObjectArrayRefStringQuery, final ApiCallback _callback) throws ApiException {
|
||||
String basePath = null;
|
||||
// Operation Servers
|
||||
String[] localBasePaths = new String[] { };
|
||||
|
||||
// Determine Base Path to Use
|
||||
if (localCustomBaseUrl != null){
|
||||
basePath = localCustomBaseUrl;
|
||||
} else if ( localBasePaths.length > 0 ) {
|
||||
basePath = localBasePaths[localHostIndex];
|
||||
} else {
|
||||
basePath = null;
|
||||
}
|
||||
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/query/style_jsonSerialization/object";
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
if (jsonSerializedObjectRefStringQuery != null) {
|
||||
localVarQueryParams.addAll(localVarApiClient.parameterToPair("json_serialized_object_ref_string_query", jsonSerializedObjectRefStringQuery));
|
||||
}
|
||||
|
||||
if (jsonSerializedObjectArrayRefStringQuery != null) {
|
||||
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "json_serialized_object_array_ref_string_query", jsonSerializedObjectArrayRefStringQuery));
|
||||
}
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"text/plain"
|
||||
};
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
localVarHeaderParams.put("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
};
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
if (localVarContentType != null) {
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call testQueryStyleJsonSerializationObjectValidateBeforeCall(@javax.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @javax.annotation.Nullable List<Pet> jsonSerializedObjectArrayRefStringQuery, final ApiCallback _callback) throws ApiException {
|
||||
return testQueryStyleJsonSerializationObjectCall(jsonSerializedObjectRefStringQuery, jsonSerializedObjectArrayRefStringQuery, _callback);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param jsonSerializedObjectRefStringQuery (optional)
|
||||
* @param jsonSerializedObjectArrayRefStringQuery (optional)
|
||||
* @return String
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
* @http.response.details
|
||||
<table border="1">
|
||||
<caption>Response Details</caption>
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 200 </td><td> Successful operation </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public String testQueryStyleJsonSerializationObject(@javax.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @javax.annotation.Nullable List<Pet> jsonSerializedObjectArrayRefStringQuery) throws ApiException {
|
||||
ApiResponse<String> localVarResp = testQueryStyleJsonSerializationObjectWithHttpInfo(jsonSerializedObjectRefStringQuery, jsonSerializedObjectArrayRefStringQuery);
|
||||
return localVarResp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param jsonSerializedObjectRefStringQuery (optional)
|
||||
* @param jsonSerializedObjectArrayRefStringQuery (optional)
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
* @http.response.details
|
||||
<table border="1">
|
||||
<caption>Response Details</caption>
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 200 </td><td> Successful operation </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public ApiResponse<String> testQueryStyleJsonSerializationObjectWithHttpInfo(@javax.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @javax.annotation.Nullable List<Pet> jsonSerializedObjectArrayRefStringQuery) throws ApiException {
|
||||
okhttp3.Call localVarCall = testQueryStyleJsonSerializationObjectValidateBeforeCall(jsonSerializedObjectRefStringQuery, jsonSerializedObjectArrayRefStringQuery, null);
|
||||
Type localVarReturnType = new TypeToken<String>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s) (asynchronously)
|
||||
* Test query parameter(s)
|
||||
* @param jsonSerializedObjectRefStringQuery (optional)
|
||||
* @param jsonSerializedObjectArrayRefStringQuery (optional)
|
||||
* @param _callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
* @http.response.details
|
||||
<table border="1">
|
||||
<caption>Response Details</caption>
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 200 </td><td> Successful operation </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public okhttp3.Call testQueryStyleJsonSerializationObjectAsync(@javax.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @javax.annotation.Nullable List<Pet> jsonSerializedObjectArrayRefStringQuery, final ApiCallback<String> _callback) throws ApiException {
|
||||
|
||||
okhttp3.Call localVarCall = testQueryStyleJsonSerializationObjectValidateBeforeCall(jsonSerializedObjectRefStringQuery, jsonSerializedObjectArrayRefStringQuery, _callback);
|
||||
Type localVarReturnType = new TypeToken<String>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,6 +146,7 @@ Class | Method | HTTP request | Description
|
||||
*QueryApi* | [**testQueryStyleFormExplodeTrueArrayString**](docs/QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s)
|
||||
*QueryApi* | [**testQueryStyleFormExplodeTrueObject**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s)
|
||||
*QueryApi* | [**testQueryStyleFormExplodeTrueObjectAllOf**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObjectAllOf) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s)
|
||||
*QueryApi* | [**testQueryStyleJsonSerializationObject**](docs/QueryApi.md#testQueryStyleJsonSerializationObject) | **GET** /query/style_jsonSerialization/object | Test query parameter(s)
|
||||
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
@@ -467,6 +467,39 @@ paths:
|
||||
- query
|
||||
x-accepts:
|
||||
- text/plain
|
||||
/query/style_jsonSerialization/object:
|
||||
get:
|
||||
description: Test query parameter(s)
|
||||
operationId: test/query/style_jsonSerialization/object
|
||||
parameters:
|
||||
- content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
in: query
|
||||
name: json_serialized_object_ref_string_query
|
||||
required: false
|
||||
- content:
|
||||
application/json:
|
||||
schema:
|
||||
items:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
type: array
|
||||
in: query
|
||||
name: json_serialized_object_array_ref_string_query
|
||||
required: false
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
description: Successful operation
|
||||
summary: Test query parameter(s)
|
||||
tags:
|
||||
- query
|
||||
x-accepts:
|
||||
- text/plain
|
||||
/body/application/octetstream/binary:
|
||||
post:
|
||||
description: Test body parameter(s)
|
||||
|
||||
@@ -14,6 +14,7 @@ All URIs are relative to *http://localhost:3000*
|
||||
| [**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) |
|
||||
| [**testQueryStyleJsonSerializationObject**](QueryApi.md#testQueryStyleJsonSerializationObject) | **GET** /query/style_jsonSerialization/object | Test query parameter(s) |
|
||||
|
||||
|
||||
|
||||
@@ -686,3 +687,71 @@ 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 | - |
|
||||
|
||||
|
||||
@@ -794,4 +794,80 @@ public class QueryApi {
|
||||
public ResponseSpec testQueryStyleFormExplodeTrueObjectAllOfWithResponseSpec(@jakarta.annotation.Nullable DataQuery queryObject) throws RestClientResponseException {
|
||||
return testQueryStyleFormExplodeTrueObjectAllOfRequestCreation(queryObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* <p><b>200</b> - Successful operation
|
||||
* @param jsonSerializedObjectRefStringQuery The jsonSerializedObjectRefStringQuery parameter
|
||||
* @param jsonSerializedObjectArrayRefStringQuery The jsonSerializedObjectArrayRefStringQuery parameter
|
||||
* @return String
|
||||
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
|
||||
*/
|
||||
private ResponseSpec testQueryStyleJsonSerializationObjectRequestCreation(@jakarta.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @jakarta.annotation.Nullable List<Pet> jsonSerializedObjectArrayRefStringQuery) throws RestClientResponseException {
|
||||
Object postBody = null;
|
||||
// create path and map variables
|
||||
final Map<String, Object> pathParams = new HashMap<>();
|
||||
|
||||
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
|
||||
final HttpHeaders headerParams = new HttpHeaders();
|
||||
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<>();
|
||||
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<>();
|
||||
|
||||
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "json_serialized_object_ref_string_query", jsonSerializedObjectRefStringQuery));
|
||||
queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "json_serialized_object_array_ref_string_query", jsonSerializedObjectArrayRefStringQuery));
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"text/plain"
|
||||
};
|
||||
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
final String[] localVarContentTypes = { };
|
||||
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
ParameterizedTypeReference<String> localVarReturnType = new ParameterizedTypeReference<>() {};
|
||||
return apiClient.invokeAPI("/query/style_jsonSerialization/object", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* <p><b>200</b> - Successful operation
|
||||
* @param jsonSerializedObjectRefStringQuery The jsonSerializedObjectRefStringQuery parameter
|
||||
* @param jsonSerializedObjectArrayRefStringQuery The jsonSerializedObjectArrayRefStringQuery parameter
|
||||
* @return String
|
||||
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
|
||||
*/
|
||||
public String testQueryStyleJsonSerializationObject(@jakarta.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @jakarta.annotation.Nullable List<Pet> jsonSerializedObjectArrayRefStringQuery) throws RestClientResponseException {
|
||||
ParameterizedTypeReference<String> localVarReturnType = new ParameterizedTypeReference<>() {};
|
||||
return testQueryStyleJsonSerializationObjectRequestCreation(jsonSerializedObjectRefStringQuery, jsonSerializedObjectArrayRefStringQuery).body(localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* <p><b>200</b> - Successful operation
|
||||
* @param jsonSerializedObjectRefStringQuery The jsonSerializedObjectRefStringQuery parameter
|
||||
* @param jsonSerializedObjectArrayRefStringQuery The jsonSerializedObjectArrayRefStringQuery parameter
|
||||
* @return ResponseEntity<String>
|
||||
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
|
||||
*/
|
||||
public ResponseEntity<String> testQueryStyleJsonSerializationObjectWithHttpInfo(@jakarta.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @jakarta.annotation.Nullable List<Pet> jsonSerializedObjectArrayRefStringQuery) throws RestClientResponseException {
|
||||
ParameterizedTypeReference<String> localVarReturnType = new ParameterizedTypeReference<>() {};
|
||||
return testQueryStyleJsonSerializationObjectRequestCreation(jsonSerializedObjectRefStringQuery, jsonSerializedObjectArrayRefStringQuery).toEntity(localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* <p><b>200</b> - Successful operation
|
||||
* @param jsonSerializedObjectRefStringQuery The jsonSerializedObjectRefStringQuery parameter
|
||||
* @param jsonSerializedObjectArrayRefStringQuery The jsonSerializedObjectArrayRefStringQuery parameter
|
||||
* @return ResponseSpec
|
||||
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
|
||||
*/
|
||||
public ResponseSpec testQueryStyleJsonSerializationObjectWithResponseSpec(@jakarta.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @jakarta.annotation.Nullable List<Pet> jsonSerializedObjectArrayRefStringQuery) throws RestClientResponseException {
|
||||
return testQueryStyleJsonSerializationObjectRequestCreation(jsonSerializedObjectRefStringQuery, jsonSerializedObjectArrayRefStringQuery);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,6 +146,7 @@ Class | Method | HTTP request | Description
|
||||
*QueryApi* | [**testQueryStyleFormExplodeTrueArrayString**](docs/QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s)
|
||||
*QueryApi* | [**testQueryStyleFormExplodeTrueObject**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s)
|
||||
*QueryApi* | [**testQueryStyleFormExplodeTrueObjectAllOf**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObjectAllOf) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s)
|
||||
*QueryApi* | [**testQueryStyleJsonSerializationObject**](docs/QueryApi.md#testQueryStyleJsonSerializationObject) | **GET** /query/style_jsonSerialization/object | Test query parameter(s)
|
||||
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
@@ -467,6 +467,39 @@ paths:
|
||||
- query
|
||||
x-accepts:
|
||||
- text/plain
|
||||
/query/style_jsonSerialization/object:
|
||||
get:
|
||||
description: Test query parameter(s)
|
||||
operationId: test/query/style_jsonSerialization/object
|
||||
parameters:
|
||||
- content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
in: query
|
||||
name: json_serialized_object_ref_string_query
|
||||
required: false
|
||||
- content:
|
||||
application/json:
|
||||
schema:
|
||||
items:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
type: array
|
||||
in: query
|
||||
name: json_serialized_object_array_ref_string_query
|
||||
required: false
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
description: Successful operation
|
||||
summary: Test query parameter(s)
|
||||
tags:
|
||||
- query
|
||||
x-accepts:
|
||||
- text/plain
|
||||
/body/application/octetstream/binary:
|
||||
post:
|
||||
description: Test body parameter(s)
|
||||
|
||||
@@ -14,6 +14,7 @@ All URIs are relative to *http://localhost:3000*
|
||||
| [**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) |
|
||||
| [**testQueryStyleJsonSerializationObject**](QueryApi.md#testQueryStyleJsonSerializationObject) | **GET** /query/style_jsonSerialization/object | Test query parameter(s) |
|
||||
|
||||
|
||||
|
||||
@@ -686,3 +687,71 @@ 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 | - |
|
||||
|
||||
|
||||
@@ -425,6 +425,47 @@ public class QueryApi {
|
||||
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"text/plain"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
GenericType<String> localVarReturnType = new GenericType<String>() {};
|
||||
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param jsonSerializedObjectRefStringQuery (optional)
|
||||
* @param jsonSerializedObjectArrayRefStringQuery (optional)
|
||||
* @return a {@code String}
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleJsonSerializationObject(@javax.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @javax.annotation.Nullable List<Pet> jsonSerializedObjectArrayRefStringQuery) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/query/style_jsonSerialization/object".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "json_serialized_object_ref_string_query", jsonSerializedObjectRefStringQuery));
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "json_serialized_object_array_ref_string_query", jsonSerializedObjectArrayRefStringQuery));
|
||||
|
||||
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"text/plain"
|
||||
};
|
||||
|
||||
@@ -146,6 +146,7 @@ Class | Method | HTTP request | Description
|
||||
*QueryApi* | [**testQueryStyleFormExplodeTrueArrayString**](docs/QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s)
|
||||
*QueryApi* | [**testQueryStyleFormExplodeTrueObject**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s)
|
||||
*QueryApi* | [**testQueryStyleFormExplodeTrueObjectAllOf**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObjectAllOf) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s)
|
||||
*QueryApi* | [**testQueryStyleJsonSerializationObject**](docs/QueryApi.md#testQueryStyleJsonSerializationObject) | **GET** /query/style_jsonSerialization/object | Test query parameter(s)
|
||||
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
@@ -467,6 +467,39 @@ paths:
|
||||
- query
|
||||
x-accepts:
|
||||
- text/plain
|
||||
/query/style_jsonSerialization/object:
|
||||
get:
|
||||
description: Test query parameter(s)
|
||||
operationId: test/query/style_jsonSerialization/object
|
||||
parameters:
|
||||
- content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
in: query
|
||||
name: json_serialized_object_ref_string_query
|
||||
required: false
|
||||
- content:
|
||||
application/json:
|
||||
schema:
|
||||
items:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
type: array
|
||||
in: query
|
||||
name: json_serialized_object_array_ref_string_query
|
||||
required: false
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
description: Successful operation
|
||||
summary: Test query parameter(s)
|
||||
tags:
|
||||
- query
|
||||
x-accepts:
|
||||
- text/plain
|
||||
/body/application/octetstream/binary:
|
||||
post:
|
||||
description: Test body parameter(s)
|
||||
|
||||
@@ -14,6 +14,7 @@ All URIs are relative to *http://localhost:3000*
|
||||
| [**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) |
|
||||
| [**testQueryStyleJsonSerializationObject**](QueryApi.md#testQueryStyleJsonSerializationObject) | **GET** /query/style_jsonSerialization/object | Test query parameter(s) |
|
||||
|
||||
|
||||
|
||||
@@ -686,3 +687,71 @@ 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 | - |
|
||||
|
||||
|
||||
@@ -514,6 +514,53 @@ public class QueryApi extends BaseApi {
|
||||
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
|
||||
return apiClient.invokeAPI("/query/style_form/explode_true/object/allOf", HttpMethod.GET, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
|
||||
}
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* <p><b>200</b> - Successful operation
|
||||
* @param jsonSerializedObjectRefStringQuery (optional)
|
||||
* @param jsonSerializedObjectArrayRefStringQuery (optional)
|
||||
* @return String
|
||||
* @throws RestClientException if an error occurs while attempting to invoke the API
|
||||
*/
|
||||
public String testQueryStyleJsonSerializationObject(Pet jsonSerializedObjectRefStringQuery, List<Pet> jsonSerializedObjectArrayRefStringQuery) throws RestClientException {
|
||||
return testQueryStyleJsonSerializationObjectWithHttpInfo(jsonSerializedObjectRefStringQuery, jsonSerializedObjectArrayRefStringQuery).getBody();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* <p><b>200</b> - Successful operation
|
||||
* @param jsonSerializedObjectRefStringQuery (optional)
|
||||
* @param jsonSerializedObjectArrayRefStringQuery (optional)
|
||||
* @return ResponseEntity<String>
|
||||
* @throws RestClientException if an error occurs while attempting to invoke the API
|
||||
*/
|
||||
public ResponseEntity<String> testQueryStyleJsonSerializationObjectWithHttpInfo(Pet jsonSerializedObjectRefStringQuery, List<Pet> jsonSerializedObjectArrayRefStringQuery) throws RestClientException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
|
||||
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
|
||||
final HttpHeaders localVarHeaderParams = new HttpHeaders();
|
||||
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
|
||||
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
|
||||
|
||||
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "json_serialized_object_ref_string_query", jsonSerializedObjectRefStringQuery));
|
||||
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "json_serialized_object_array_ref_string_query", jsonSerializedObjectArrayRefStringQuery));
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"text/plain"
|
||||
};
|
||||
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
final String[] localVarContentTypes = { };
|
||||
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
|
||||
return apiClient.invokeAPI("/query/style_jsonSerialization/object", HttpMethod.GET, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> ResponseEntity<T> invokeAPI(String url, HttpMethod method, Object request, ParameterizedTypeReference<T> returnType) throws RestClientException {
|
||||
|
||||
Reference in New Issue
Block a user