mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-07 17:16:09 +00:00
[Java][native] Add ability to add header to specific calls (#21495)
* add bearer capability * avoid using shared state * revert needless change * Revert authentication changes from unused root Java/api.mustache template * applied change to correct lib type * updated test files * made security method more generic for flexibility * regenerated samples * further cleanup * code style * regenerated samples * made header assignment more explicit, per each method * fixed extra comma * fixed commas, regenerated samples * moved header population to utility method * moved static class inside main class * regenerated samples * added comments, fixed indentation * regenerated samples --------- Co-authored-by: Ilya Nemtsev <ilyanemtsev@192.168.1.34>
This commit is contained in:
@@ -46,6 +46,26 @@ import java.util.function.Consumer;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
|
||||
public class AuthApi {
|
||||
/**
|
||||
* Utility class for extending HttpRequest.Builder functionality.
|
||||
*/
|
||||
private static class HttpRequestBuilderExtensions {
|
||||
/**
|
||||
* Adds additional headers to the provided HttpRequest.Builder. Useful for adding method/endpoint specific headers.
|
||||
*
|
||||
* @param builder the HttpRequest.Builder to which headers will be added
|
||||
* @param headers a map of header names and values to add; may be null
|
||||
* @return the same HttpRequest.Builder instance with the additional headers set
|
||||
*/
|
||||
static HttpRequest.Builder withAdditionalHeaders(HttpRequest.Builder builder, Map<String, String> headers) {
|
||||
if (headers != null) {
|
||||
for (Map.Entry<String, String> entry : headers.entrySet()) {
|
||||
builder.header(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
private final HttpClient memberVarHttpClient;
|
||||
private final ObjectMapper memberVarObjectMapper;
|
||||
private final String memberVarBaseUri;
|
||||
@@ -68,6 +88,7 @@ public class AuthApi {
|
||||
memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor();
|
||||
}
|
||||
|
||||
|
||||
protected ApiException getApiException(String operationId, HttpResponse<InputStream> response) throws IOException {
|
||||
String body = response.body() == null ? null : new String(response.body().readAllBytes());
|
||||
String message = formatExceptionMessage(operationId, response.statusCode(), body);
|
||||
@@ -136,7 +157,18 @@ public class AuthApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testAuthHttpBasic() throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testAuthHttpBasicWithHttpInfo();
|
||||
return testAuthHttpBasic(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test HTTP basic authentication
|
||||
* To test HTTP basic authentication
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testAuthHttpBasic(Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testAuthHttpBasicWithHttpInfo(headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -147,7 +179,18 @@ public class AuthApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testAuthHttpBasicWithHttpInfo() throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testAuthHttpBasicRequestBuilder();
|
||||
return testAuthHttpBasicWithHttpInfo(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test HTTP basic authentication
|
||||
* To test HTTP basic authentication
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testAuthHttpBasicWithHttpInfo(Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testAuthHttpBasicRequestBuilder(headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -183,7 +226,7 @@ public class AuthApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testAuthHttpBasicRequestBuilder() throws ApiException {
|
||||
private HttpRequest.Builder testAuthHttpBasicRequestBuilder(Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -197,6 +240,8 @@ public class AuthApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -210,7 +255,18 @@ public class AuthApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testAuthHttpBearer() throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testAuthHttpBearerWithHttpInfo();
|
||||
return testAuthHttpBearer(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test HTTP bearer authentication
|
||||
* To test HTTP bearer authentication
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testAuthHttpBearer(Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testAuthHttpBearerWithHttpInfo(headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -221,7 +277,18 @@ public class AuthApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testAuthHttpBearerWithHttpInfo() throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testAuthHttpBearerRequestBuilder();
|
||||
return testAuthHttpBearerWithHttpInfo(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test HTTP bearer authentication
|
||||
* To test HTTP bearer authentication
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testAuthHttpBearerWithHttpInfo(Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testAuthHttpBearerRequestBuilder(headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -257,7 +324,7 @@ public class AuthApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testAuthHttpBearerRequestBuilder() throws ApiException {
|
||||
private HttpRequest.Builder testAuthHttpBearerRequestBuilder(Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -271,6 +338,8 @@ public class AuthApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
|
||||
@@ -56,6 +56,26 @@ import java.util.function.Consumer;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
|
||||
public class BodyApi {
|
||||
/**
|
||||
* Utility class for extending HttpRequest.Builder functionality.
|
||||
*/
|
||||
private static class HttpRequestBuilderExtensions {
|
||||
/**
|
||||
* Adds additional headers to the provided HttpRequest.Builder. Useful for adding method/endpoint specific headers.
|
||||
*
|
||||
* @param builder the HttpRequest.Builder to which headers will be added
|
||||
* @param headers a map of header names and values to add; may be null
|
||||
* @return the same HttpRequest.Builder instance with the additional headers set
|
||||
*/
|
||||
static HttpRequest.Builder withAdditionalHeaders(HttpRequest.Builder builder, Map<String, String> headers) {
|
||||
if (headers != null) {
|
||||
for (Map.Entry<String, String> entry : headers.entrySet()) {
|
||||
builder.header(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
private final HttpClient memberVarHttpClient;
|
||||
private final ObjectMapper memberVarObjectMapper;
|
||||
private final String memberVarBaseUri;
|
||||
@@ -78,6 +98,7 @@ public class BodyApi {
|
||||
memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor();
|
||||
}
|
||||
|
||||
|
||||
protected ApiException getApiException(String operationId, HttpResponse<InputStream> response) throws IOException {
|
||||
String body = response.body() == null ? null : new String(response.body().readAllBytes());
|
||||
String message = formatExceptionMessage(operationId, response.statusCode(), body);
|
||||
@@ -146,7 +167,18 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public File testBinaryGif() throws ApiException {
|
||||
ApiResponse<File> localVarResponse = testBinaryGifWithHttpInfo();
|
||||
return testBinaryGif(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test binary (gif) response body
|
||||
* Test binary (gif) response body
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return File
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public File testBinaryGif(Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<File> localVarResponse = testBinaryGifWithHttpInfo(headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -157,7 +189,18 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<File> testBinaryGifWithHttpInfo() throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testBinaryGifRequestBuilder();
|
||||
return testBinaryGifWithHttpInfo(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test binary (gif) response body
|
||||
* Test binary (gif) response body
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<File>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<File> testBinaryGifWithHttpInfo(Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testBinaryGifRequestBuilder(headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -199,7 +242,7 @@ public class BodyApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testBinaryGifRequestBuilder() throws ApiException {
|
||||
private HttpRequest.Builder testBinaryGifRequestBuilder(Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -213,6 +256,8 @@ public class BodyApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -227,7 +272,19 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testBodyApplicationOctetstreamBinary(@javax.annotation.Nullable File body) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testBodyApplicationOctetstreamBinaryWithHttpInfo(body);
|
||||
return testBodyApplicationOctetstreamBinary(body, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test body parameter(s)
|
||||
* Test body parameter(s)
|
||||
* @param body (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testBodyApplicationOctetstreamBinary(@javax.annotation.Nullable File body, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testBodyApplicationOctetstreamBinaryWithHttpInfo(body, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -239,7 +296,19 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testBodyApplicationOctetstreamBinaryWithHttpInfo(@javax.annotation.Nullable File body) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testBodyApplicationOctetstreamBinaryRequestBuilder(body);
|
||||
return testBodyApplicationOctetstreamBinaryWithHttpInfo(body, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test body parameter(s)
|
||||
* Test body parameter(s)
|
||||
* @param body (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testBodyApplicationOctetstreamBinaryWithHttpInfo(@javax.annotation.Nullable File body, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testBodyApplicationOctetstreamBinaryRequestBuilder(body, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -275,7 +344,7 @@ public class BodyApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testBodyApplicationOctetstreamBinaryRequestBuilder(@javax.annotation.Nullable File body) throws ApiException {
|
||||
private HttpRequest.Builder testBodyApplicationOctetstreamBinaryRequestBuilder(@javax.annotation.Nullable File body, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -295,6 +364,8 @@ public class BodyApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -309,7 +380,19 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testBodyMultipartFormdataArrayOfBinary(@javax.annotation.Nonnull List<File> files) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(files);
|
||||
return testBodyMultipartFormdataArrayOfBinary(files, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test array of binary in multipart mime
|
||||
* Test array of binary in multipart mime
|
||||
* @param files (required)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testBodyMultipartFormdataArrayOfBinary(@javax.annotation.Nonnull List<File> files, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(files, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -321,7 +404,19 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(@javax.annotation.Nonnull List<File> files) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testBodyMultipartFormdataArrayOfBinaryRequestBuilder(files);
|
||||
return testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(files, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test array of binary in multipart mime
|
||||
* Test array of binary in multipart mime
|
||||
* @param files (required)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(@javax.annotation.Nonnull List<File> files, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testBodyMultipartFormdataArrayOfBinaryRequestBuilder(files, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -357,7 +452,7 @@ public class BodyApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testBodyMultipartFormdataArrayOfBinaryRequestBuilder(@javax.annotation.Nonnull List<File> files) throws ApiException {
|
||||
private HttpRequest.Builder testBodyMultipartFormdataArrayOfBinaryRequestBuilder(@javax.annotation.Nonnull List<File> files, Map<String, String> headers) throws ApiException {
|
||||
// verify the required parameter 'files' is set
|
||||
if (files == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'files' when calling testBodyMultipartFormdataArrayOfBinary");
|
||||
@@ -410,6 +505,8 @@ public class BodyApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -424,7 +521,19 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testBodyMultipartFormdataSingleBinary(@javax.annotation.Nullable File myFile) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testBodyMultipartFormdataSingleBinaryWithHttpInfo(myFile);
|
||||
return testBodyMultipartFormdataSingleBinary(myFile, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test single binary in multipart mime
|
||||
* Test single binary in multipart mime
|
||||
* @param myFile (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testBodyMultipartFormdataSingleBinary(@javax.annotation.Nullable File myFile, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testBodyMultipartFormdataSingleBinaryWithHttpInfo(myFile, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -436,7 +545,19 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testBodyMultipartFormdataSingleBinaryWithHttpInfo(@javax.annotation.Nullable File myFile) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testBodyMultipartFormdataSingleBinaryRequestBuilder(myFile);
|
||||
return testBodyMultipartFormdataSingleBinaryWithHttpInfo(myFile, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test single binary in multipart mime
|
||||
* Test single binary in multipart mime
|
||||
* @param myFile (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testBodyMultipartFormdataSingleBinaryWithHttpInfo(@javax.annotation.Nullable File myFile, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testBodyMultipartFormdataSingleBinaryRequestBuilder(myFile, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -472,7 +593,7 @@ public class BodyApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testBodyMultipartFormdataSingleBinaryRequestBuilder(@javax.annotation.Nullable File myFile) throws ApiException {
|
||||
private HttpRequest.Builder testBodyMultipartFormdataSingleBinaryRequestBuilder(@javax.annotation.Nullable File myFile, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -519,6 +640,8 @@ public class BodyApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -533,7 +656,19 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Pet testEchoBodyAllOfPet(@javax.annotation.Nullable Pet pet) throws ApiException {
|
||||
ApiResponse<Pet> localVarResponse = testEchoBodyAllOfPetWithHttpInfo(pet);
|
||||
return testEchoBodyAllOfPet(pet, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test body parameter(s)
|
||||
* Test body parameter(s)
|
||||
* @param pet Pet object that needs to be added to the store (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return Pet
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Pet testEchoBodyAllOfPet(@javax.annotation.Nullable Pet pet, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<Pet> localVarResponse = testEchoBodyAllOfPetWithHttpInfo(pet, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -545,7 +680,19 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Pet> testEchoBodyAllOfPetWithHttpInfo(@javax.annotation.Nullable Pet pet) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testEchoBodyAllOfPetRequestBuilder(pet);
|
||||
return testEchoBodyAllOfPetWithHttpInfo(pet, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test body parameter(s)
|
||||
* Test body parameter(s)
|
||||
* @param pet Pet object that needs to be added to the store (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<Pet>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Pet> testEchoBodyAllOfPetWithHttpInfo(@javax.annotation.Nullable Pet pet, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testEchoBodyAllOfPetRequestBuilder(pet, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -588,7 +735,7 @@ public class BodyApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testEchoBodyAllOfPetRequestBuilder(@javax.annotation.Nullable Pet pet) throws ApiException {
|
||||
private HttpRequest.Builder testEchoBodyAllOfPetRequestBuilder(@javax.annotation.Nullable Pet pet, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -608,6 +755,8 @@ public class BodyApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -622,7 +771,19 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testEchoBodyFreeFormObjectResponseString(@javax.annotation.Nullable Object body) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testEchoBodyFreeFormObjectResponseStringWithHttpInfo(body);
|
||||
return testEchoBodyFreeFormObjectResponseString(body, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test free form object
|
||||
* Test free form object
|
||||
* @param body Free form object (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testEchoBodyFreeFormObjectResponseString(@javax.annotation.Nullable Object body, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testEchoBodyFreeFormObjectResponseStringWithHttpInfo(body, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -634,7 +795,19 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testEchoBodyFreeFormObjectResponseStringWithHttpInfo(@javax.annotation.Nullable Object body) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testEchoBodyFreeFormObjectResponseStringRequestBuilder(body);
|
||||
return testEchoBodyFreeFormObjectResponseStringWithHttpInfo(body, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test free form object
|
||||
* Test free form object
|
||||
* @param body Free form object (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testEchoBodyFreeFormObjectResponseStringWithHttpInfo(@javax.annotation.Nullable Object body, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testEchoBodyFreeFormObjectResponseStringRequestBuilder(body, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -670,7 +843,7 @@ public class BodyApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testEchoBodyFreeFormObjectResponseStringRequestBuilder(@javax.annotation.Nullable Object body) throws ApiException {
|
||||
private HttpRequest.Builder testEchoBodyFreeFormObjectResponseStringRequestBuilder(@javax.annotation.Nullable Object body, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -690,6 +863,8 @@ public class BodyApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -704,7 +879,19 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Pet testEchoBodyPet(@javax.annotation.Nullable Pet pet) throws ApiException {
|
||||
ApiResponse<Pet> localVarResponse = testEchoBodyPetWithHttpInfo(pet);
|
||||
return testEchoBodyPet(pet, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test body parameter(s)
|
||||
* Test body parameter(s)
|
||||
* @param pet Pet object that needs to be added to the store (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return Pet
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Pet testEchoBodyPet(@javax.annotation.Nullable Pet pet, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<Pet> localVarResponse = testEchoBodyPetWithHttpInfo(pet, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -716,7 +903,19 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Pet> testEchoBodyPetWithHttpInfo(@javax.annotation.Nullable Pet pet) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testEchoBodyPetRequestBuilder(pet);
|
||||
return testEchoBodyPetWithHttpInfo(pet, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test body parameter(s)
|
||||
* Test body parameter(s)
|
||||
* @param pet Pet object that needs to be added to the store (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<Pet>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Pet> testEchoBodyPetWithHttpInfo(@javax.annotation.Nullable Pet pet, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testEchoBodyPetRequestBuilder(pet, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -759,7 +958,7 @@ public class BodyApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testEchoBodyPetRequestBuilder(@javax.annotation.Nullable Pet pet) throws ApiException {
|
||||
private HttpRequest.Builder testEchoBodyPetRequestBuilder(@javax.annotation.Nullable Pet pet, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -779,6 +978,8 @@ public class BodyApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -793,7 +994,19 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testEchoBodyPetResponseString(@javax.annotation.Nullable Pet pet) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testEchoBodyPetResponseStringWithHttpInfo(pet);
|
||||
return testEchoBodyPetResponseString(pet, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test empty response body
|
||||
* Test empty response body
|
||||
* @param pet Pet object that needs to be added to the store (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testEchoBodyPetResponseString(@javax.annotation.Nullable Pet pet, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testEchoBodyPetResponseStringWithHttpInfo(pet, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -805,7 +1018,19 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testEchoBodyPetResponseStringWithHttpInfo(@javax.annotation.Nullable Pet pet) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testEchoBodyPetResponseStringRequestBuilder(pet);
|
||||
return testEchoBodyPetResponseStringWithHttpInfo(pet, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test empty response body
|
||||
* Test empty response body
|
||||
* @param pet Pet object that needs to be added to the store (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testEchoBodyPetResponseStringWithHttpInfo(@javax.annotation.Nullable Pet pet, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testEchoBodyPetResponseStringRequestBuilder(pet, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -841,7 +1066,7 @@ public class BodyApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testEchoBodyPetResponseStringRequestBuilder(@javax.annotation.Nullable Pet pet) throws ApiException {
|
||||
private HttpRequest.Builder testEchoBodyPetResponseStringRequestBuilder(@javax.annotation.Nullable Pet pet, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -861,6 +1086,8 @@ public class BodyApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -875,7 +1102,19 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public StringEnumRef testEchoBodyStringEnum(@javax.annotation.Nullable String body) throws ApiException {
|
||||
ApiResponse<StringEnumRef> localVarResponse = testEchoBodyStringEnumWithHttpInfo(body);
|
||||
return testEchoBodyStringEnum(body, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test string enum response body
|
||||
* Test string enum response body
|
||||
* @param body String enum (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return StringEnumRef
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public StringEnumRef testEchoBodyStringEnum(@javax.annotation.Nullable String body, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<StringEnumRef> localVarResponse = testEchoBodyStringEnumWithHttpInfo(body, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -887,7 +1126,19 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<StringEnumRef> testEchoBodyStringEnumWithHttpInfo(@javax.annotation.Nullable String body) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testEchoBodyStringEnumRequestBuilder(body);
|
||||
return testEchoBodyStringEnumWithHttpInfo(body, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test string enum response body
|
||||
* Test string enum response body
|
||||
* @param body String enum (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<StringEnumRef>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<StringEnumRef> testEchoBodyStringEnumWithHttpInfo(@javax.annotation.Nullable String body, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testEchoBodyStringEnumRequestBuilder(body, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -930,7 +1181,7 @@ public class BodyApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testEchoBodyStringEnumRequestBuilder(@javax.annotation.Nullable String body) throws ApiException {
|
||||
private HttpRequest.Builder testEchoBodyStringEnumRequestBuilder(@javax.annotation.Nullable String body, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -950,6 +1201,8 @@ public class BodyApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -964,7 +1217,19 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testEchoBodyTagResponseString(@javax.annotation.Nullable Tag tag) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testEchoBodyTagResponseStringWithHttpInfo(tag);
|
||||
return testEchoBodyTagResponseString(tag, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test empty json (request body)
|
||||
* Test empty json (request body)
|
||||
* @param tag Tag object (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testEchoBodyTagResponseString(@javax.annotation.Nullable Tag tag, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testEchoBodyTagResponseStringWithHttpInfo(tag, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -976,7 +1241,19 @@ public class BodyApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testEchoBodyTagResponseStringWithHttpInfo(@javax.annotation.Nullable Tag tag) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testEchoBodyTagResponseStringRequestBuilder(tag);
|
||||
return testEchoBodyTagResponseStringWithHttpInfo(tag, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test empty json (request body)
|
||||
* Test empty json (request body)
|
||||
* @param tag Tag object (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testEchoBodyTagResponseStringWithHttpInfo(@javax.annotation.Nullable Tag tag, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testEchoBodyTagResponseStringRequestBuilder(tag, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -1012,7 +1289,7 @@ public class BodyApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testEchoBodyTagResponseStringRequestBuilder(@javax.annotation.Nullable Tag tag) throws ApiException {
|
||||
private HttpRequest.Builder testEchoBodyTagResponseStringRequestBuilder(@javax.annotation.Nullable Tag tag, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -1032,6 +1309,8 @@ public class BodyApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
|
||||
@@ -53,6 +53,26 @@ import java.util.function.Consumer;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
|
||||
public class FormApi {
|
||||
/**
|
||||
* Utility class for extending HttpRequest.Builder functionality.
|
||||
*/
|
||||
private static class HttpRequestBuilderExtensions {
|
||||
/**
|
||||
* Adds additional headers to the provided HttpRequest.Builder. Useful for adding method/endpoint specific headers.
|
||||
*
|
||||
* @param builder the HttpRequest.Builder to which headers will be added
|
||||
* @param headers a map of header names and values to add; may be null
|
||||
* @return the same HttpRequest.Builder instance with the additional headers set
|
||||
*/
|
||||
static HttpRequest.Builder withAdditionalHeaders(HttpRequest.Builder builder, Map<String, String> headers) {
|
||||
if (headers != null) {
|
||||
for (Map.Entry<String, String> entry : headers.entrySet()) {
|
||||
builder.header(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
private final HttpClient memberVarHttpClient;
|
||||
private final ObjectMapper memberVarObjectMapper;
|
||||
private final String memberVarBaseUri;
|
||||
@@ -75,6 +95,7 @@ public class FormApi {
|
||||
memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor();
|
||||
}
|
||||
|
||||
|
||||
protected ApiException getApiException(String operationId, HttpResponse<InputStream> response) throws IOException {
|
||||
String body = response.body() == null ? null : new String(response.body().readAllBytes());
|
||||
String message = formatExceptionMessage(operationId, response.statusCode(), body);
|
||||
@@ -146,7 +167,21 @@ public class FormApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testFormIntegerBooleanString(@javax.annotation.Nullable Integer integerForm, @javax.annotation.Nullable Boolean booleanForm, @javax.annotation.Nullable String stringForm) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testFormIntegerBooleanStringWithHttpInfo(integerForm, booleanForm, stringForm);
|
||||
return testFormIntegerBooleanString(integerForm, booleanForm, stringForm, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test form parameter(s)
|
||||
* Test form parameter(s)
|
||||
* @param integerForm (optional)
|
||||
* @param booleanForm (optional)
|
||||
* @param stringForm (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testFormIntegerBooleanString(@javax.annotation.Nullable Integer integerForm, @javax.annotation.Nullable Boolean booleanForm, @javax.annotation.Nullable String stringForm, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testFormIntegerBooleanStringWithHttpInfo(integerForm, booleanForm, stringForm, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -160,7 +195,21 @@ public class FormApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testFormIntegerBooleanStringWithHttpInfo(@javax.annotation.Nullable Integer integerForm, @javax.annotation.Nullable Boolean booleanForm, @javax.annotation.Nullable String stringForm) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testFormIntegerBooleanStringRequestBuilder(integerForm, booleanForm, stringForm);
|
||||
return testFormIntegerBooleanStringWithHttpInfo(integerForm, booleanForm, stringForm, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test form parameter(s)
|
||||
* Test form parameter(s)
|
||||
* @param integerForm (optional)
|
||||
* @param booleanForm (optional)
|
||||
* @param stringForm (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testFormIntegerBooleanStringWithHttpInfo(@javax.annotation.Nullable Integer integerForm, @javax.annotation.Nullable Boolean booleanForm, @javax.annotation.Nullable String stringForm, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testFormIntegerBooleanStringRequestBuilder(integerForm, booleanForm, stringForm, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -196,7 +245,7 @@ public class FormApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testFormIntegerBooleanStringRequestBuilder(@javax.annotation.Nullable Integer integerForm, @javax.annotation.Nullable Boolean booleanForm, @javax.annotation.Nullable String stringForm) throws ApiException {
|
||||
private HttpRequest.Builder testFormIntegerBooleanStringRequestBuilder(@javax.annotation.Nullable Integer integerForm, @javax.annotation.Nullable Boolean booleanForm, @javax.annotation.Nullable String stringForm, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -230,6 +279,8 @@ public class FormApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -244,7 +295,19 @@ public class FormApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testFormObjectMultipart(@javax.annotation.Nonnull TestFormObjectMultipartRequestMarker marker) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testFormObjectMultipartWithHttpInfo(marker);
|
||||
return testFormObjectMultipart(marker, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test form parameter(s) for multipart schema
|
||||
* Test form parameter(s) for multipart schema
|
||||
* @param marker (required)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testFormObjectMultipart(@javax.annotation.Nonnull TestFormObjectMultipartRequestMarker marker, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testFormObjectMultipartWithHttpInfo(marker, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -256,7 +319,19 @@ public class FormApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testFormObjectMultipartWithHttpInfo(@javax.annotation.Nonnull TestFormObjectMultipartRequestMarker marker) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testFormObjectMultipartRequestBuilder(marker);
|
||||
return testFormObjectMultipartWithHttpInfo(marker, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test form parameter(s) for multipart schema
|
||||
* Test form parameter(s) for multipart schema
|
||||
* @param marker (required)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testFormObjectMultipartWithHttpInfo(@javax.annotation.Nonnull TestFormObjectMultipartRequestMarker marker, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testFormObjectMultipartRequestBuilder(marker, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -292,7 +367,7 @@ public class FormApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testFormObjectMultipartRequestBuilder(@javax.annotation.Nonnull TestFormObjectMultipartRequestMarker marker) throws ApiException {
|
||||
private HttpRequest.Builder testFormObjectMultipartRequestBuilder(@javax.annotation.Nonnull TestFormObjectMultipartRequestMarker marker, Map<String, String> headers) throws ApiException {
|
||||
// verify the required parameter 'marker' is set
|
||||
if (marker == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'marker' when calling testFormObjectMultipart");
|
||||
@@ -344,6 +419,8 @@ public class FormApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -363,7 +440,24 @@ public class FormApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testFormOneof(@javax.annotation.Nullable String form1, @javax.annotation.Nullable Integer form2, @javax.annotation.Nullable String form3, @javax.annotation.Nullable Boolean form4, @javax.annotation.Nullable Long id, @javax.annotation.Nullable String name) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testFormOneofWithHttpInfo(form1, form2, form3, form4, id, name);
|
||||
return testFormOneof(form1, form2, form3, form4, id, name, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test form parameter(s) for oneOf schema
|
||||
* Test form parameter(s) for oneOf schema
|
||||
* @param form1 (optional)
|
||||
* @param form2 (optional)
|
||||
* @param form3 (optional)
|
||||
* @param form4 (optional)
|
||||
* @param id (optional)
|
||||
* @param name (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testFormOneof(@javax.annotation.Nullable String form1, @javax.annotation.Nullable Integer form2, @javax.annotation.Nullable String form3, @javax.annotation.Nullable Boolean form4, @javax.annotation.Nullable Long id, @javax.annotation.Nullable String name, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testFormOneofWithHttpInfo(form1, form2, form3, form4, id, name, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -380,7 +474,24 @@ public class FormApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testFormOneofWithHttpInfo(@javax.annotation.Nullable String form1, @javax.annotation.Nullable Integer form2, @javax.annotation.Nullable String form3, @javax.annotation.Nullable Boolean form4, @javax.annotation.Nullable Long id, @javax.annotation.Nullable String name) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testFormOneofRequestBuilder(form1, form2, form3, form4, id, name);
|
||||
return testFormOneofWithHttpInfo(form1, form2, form3, form4, id, name, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test form parameter(s) for oneOf schema
|
||||
* Test form parameter(s) for oneOf schema
|
||||
* @param form1 (optional)
|
||||
* @param form2 (optional)
|
||||
* @param form3 (optional)
|
||||
* @param form4 (optional)
|
||||
* @param id (optional)
|
||||
* @param name (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testFormOneofWithHttpInfo(@javax.annotation.Nullable String form1, @javax.annotation.Nullable Integer form2, @javax.annotation.Nullable String form3, @javax.annotation.Nullable Boolean form4, @javax.annotation.Nullable Long id, @javax.annotation.Nullable String name, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testFormOneofRequestBuilder(form1, form2, form3, form4, id, name, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -416,7 +527,7 @@ public class FormApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testFormOneofRequestBuilder(@javax.annotation.Nullable String form1, @javax.annotation.Nullable Integer form2, @javax.annotation.Nullable String form3, @javax.annotation.Nullable Boolean form4, @javax.annotation.Nullable Long id, @javax.annotation.Nullable String name) throws ApiException {
|
||||
private HttpRequest.Builder testFormOneofRequestBuilder(@javax.annotation.Nullable String form1, @javax.annotation.Nullable Integer form2, @javax.annotation.Nullable String form3, @javax.annotation.Nullable Boolean form4, @javax.annotation.Nullable Long id, @javax.annotation.Nullable String name, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -459,6 +570,8 @@ public class FormApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
|
||||
@@ -53,6 +53,26 @@ import java.util.function.Consumer;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
|
||||
public class HeaderApi {
|
||||
/**
|
||||
* Utility class for extending HttpRequest.Builder functionality.
|
||||
*/
|
||||
private static class HttpRequestBuilderExtensions {
|
||||
/**
|
||||
* Adds additional headers to the provided HttpRequest.Builder. Useful for adding method/endpoint specific headers.
|
||||
*
|
||||
* @param builder the HttpRequest.Builder to which headers will be added
|
||||
* @param headers a map of header names and values to add; may be null
|
||||
* @return the same HttpRequest.Builder instance with the additional headers set
|
||||
*/
|
||||
static HttpRequest.Builder withAdditionalHeaders(HttpRequest.Builder builder, Map<String, String> headers) {
|
||||
if (headers != null) {
|
||||
for (Map.Entry<String, String> entry : headers.entrySet()) {
|
||||
builder.header(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
private final HttpClient memberVarHttpClient;
|
||||
private final ObjectMapper memberVarObjectMapper;
|
||||
private final String memberVarBaseUri;
|
||||
@@ -75,6 +95,7 @@ public class HeaderApi {
|
||||
memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor();
|
||||
}
|
||||
|
||||
|
||||
protected ApiException getApiException(String operationId, HttpResponse<InputStream> response) throws IOException {
|
||||
String body = response.body() == null ? null : new String(response.body().readAllBytes());
|
||||
String message = formatExceptionMessage(operationId, response.statusCode(), body);
|
||||
@@ -148,7 +169,23 @@ public class HeaderApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testHeaderIntegerBooleanStringEnums(@javax.annotation.Nullable Integer integerHeader, @javax.annotation.Nullable Boolean booleanHeader, @javax.annotation.Nullable String stringHeader, @javax.annotation.Nullable String enumNonrefStringHeader, @javax.annotation.Nullable StringEnumRef enumRefStringHeader) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testHeaderIntegerBooleanStringEnumsWithHttpInfo(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader);
|
||||
return testHeaderIntegerBooleanStringEnums(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test header parameter(s)
|
||||
* Test header parameter(s)
|
||||
* @param integerHeader (optional)
|
||||
* @param booleanHeader (optional)
|
||||
* @param stringHeader (optional)
|
||||
* @param enumNonrefStringHeader (optional)
|
||||
* @param enumRefStringHeader (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testHeaderIntegerBooleanStringEnums(@javax.annotation.Nullable Integer integerHeader, @javax.annotation.Nullable Boolean booleanHeader, @javax.annotation.Nullable String stringHeader, @javax.annotation.Nullable String enumNonrefStringHeader, @javax.annotation.Nullable StringEnumRef enumRefStringHeader, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testHeaderIntegerBooleanStringEnumsWithHttpInfo(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -164,7 +201,23 @@ public class HeaderApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testHeaderIntegerBooleanStringEnumsWithHttpInfo(@javax.annotation.Nullable Integer integerHeader, @javax.annotation.Nullable Boolean booleanHeader, @javax.annotation.Nullable String stringHeader, @javax.annotation.Nullable String enumNonrefStringHeader, @javax.annotation.Nullable StringEnumRef enumRefStringHeader) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testHeaderIntegerBooleanStringEnumsRequestBuilder(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader);
|
||||
return testHeaderIntegerBooleanStringEnumsWithHttpInfo(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test header parameter(s)
|
||||
* Test header parameter(s)
|
||||
* @param integerHeader (optional)
|
||||
* @param booleanHeader (optional)
|
||||
* @param stringHeader (optional)
|
||||
* @param enumNonrefStringHeader (optional)
|
||||
* @param enumRefStringHeader (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testHeaderIntegerBooleanStringEnumsWithHttpInfo(@javax.annotation.Nullable Integer integerHeader, @javax.annotation.Nullable Boolean booleanHeader, @javax.annotation.Nullable String stringHeader, @javax.annotation.Nullable String enumNonrefStringHeader, @javax.annotation.Nullable StringEnumRef enumRefStringHeader, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testHeaderIntegerBooleanStringEnumsRequestBuilder(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -200,7 +253,7 @@ public class HeaderApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testHeaderIntegerBooleanStringEnumsRequestBuilder(@javax.annotation.Nullable Integer integerHeader, @javax.annotation.Nullable Boolean booleanHeader, @javax.annotation.Nullable String stringHeader, @javax.annotation.Nullable String enumNonrefStringHeader, @javax.annotation.Nullable StringEnumRef enumRefStringHeader) throws ApiException {
|
||||
private HttpRequest.Builder testHeaderIntegerBooleanStringEnumsRequestBuilder(@javax.annotation.Nullable Integer integerHeader, @javax.annotation.Nullable Boolean booleanHeader, @javax.annotation.Nullable String stringHeader, @javax.annotation.Nullable String enumNonrefStringHeader, @javax.annotation.Nullable StringEnumRef enumRefStringHeader, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -229,6 +282,8 @@ public class HeaderApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
|
||||
@@ -53,6 +53,26 @@ import java.util.function.Consumer;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
|
||||
public class PathApi {
|
||||
/**
|
||||
* Utility class for extending HttpRequest.Builder functionality.
|
||||
*/
|
||||
private static class HttpRequestBuilderExtensions {
|
||||
/**
|
||||
* Adds additional headers to the provided HttpRequest.Builder. Useful for adding method/endpoint specific headers.
|
||||
*
|
||||
* @param builder the HttpRequest.Builder to which headers will be added
|
||||
* @param headers a map of header names and values to add; may be null
|
||||
* @return the same HttpRequest.Builder instance with the additional headers set
|
||||
*/
|
||||
static HttpRequest.Builder withAdditionalHeaders(HttpRequest.Builder builder, Map<String, String> headers) {
|
||||
if (headers != null) {
|
||||
for (Map.Entry<String, String> entry : headers.entrySet()) {
|
||||
builder.header(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
private final HttpClient memberVarHttpClient;
|
||||
private final ObjectMapper memberVarObjectMapper;
|
||||
private final String memberVarBaseUri;
|
||||
@@ -75,6 +95,7 @@ public class PathApi {
|
||||
memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor();
|
||||
}
|
||||
|
||||
|
||||
protected ApiException getApiException(String operationId, HttpResponse<InputStream> response) throws IOException {
|
||||
String body = response.body() == null ? null : new String(response.body().readAllBytes());
|
||||
String message = formatExceptionMessage(operationId, response.statusCode(), body);
|
||||
@@ -147,7 +168,22 @@ public class PathApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(@javax.annotation.Nonnull String pathString, @javax.annotation.Nonnull Integer pathInteger, @javax.annotation.Nonnull String enumNonrefStringPath, @javax.annotation.Nonnull StringEnumRef enumRefStringPath) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath);
|
||||
return testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test path parameter(s)
|
||||
* Test path parameter(s)
|
||||
* @param pathString (required)
|
||||
* @param pathInteger (required)
|
||||
* @param enumNonrefStringPath (required)
|
||||
* @param enumRefStringPath (required)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(@javax.annotation.Nonnull String pathString, @javax.annotation.Nonnull Integer pathInteger, @javax.annotation.Nonnull String enumNonrefStringPath, @javax.annotation.Nonnull StringEnumRef enumRefStringPath, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -162,7 +198,22 @@ public class PathApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(@javax.annotation.Nonnull String pathString, @javax.annotation.Nonnull Integer pathInteger, @javax.annotation.Nonnull String enumNonrefStringPath, @javax.annotation.Nonnull StringEnumRef enumRefStringPath) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathRequestBuilder(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath);
|
||||
return testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test path parameter(s)
|
||||
* Test path parameter(s)
|
||||
* @param pathString (required)
|
||||
* @param pathInteger (required)
|
||||
* @param enumNonrefStringPath (required)
|
||||
* @param enumRefStringPath (required)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(@javax.annotation.Nonnull String pathString, @javax.annotation.Nonnull Integer pathInteger, @javax.annotation.Nonnull String enumNonrefStringPath, @javax.annotation.Nonnull StringEnumRef enumRefStringPath, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathRequestBuilder(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -198,7 +249,7 @@ public class PathApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathRequestBuilder(@javax.annotation.Nonnull String pathString, @javax.annotation.Nonnull Integer pathInteger, @javax.annotation.Nonnull String enumNonrefStringPath, @javax.annotation.Nonnull StringEnumRef enumRefStringPath) throws ApiException {
|
||||
private HttpRequest.Builder testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathRequestBuilder(@javax.annotation.Nonnull String pathString, @javax.annotation.Nonnull Integer pathInteger, @javax.annotation.Nonnull String enumNonrefStringPath, @javax.annotation.Nonnull StringEnumRef enumRefStringPath, Map<String, String> headers) throws ApiException {
|
||||
// verify the required parameter 'pathString' is set
|
||||
if (pathString == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'pathString' when calling testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath");
|
||||
@@ -232,6 +283,8 @@ public class PathApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
|
||||
@@ -59,6 +59,26 @@ import java.util.function.Consumer;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
|
||||
public class QueryApi {
|
||||
/**
|
||||
* Utility class for extending HttpRequest.Builder functionality.
|
||||
*/
|
||||
private static class HttpRequestBuilderExtensions {
|
||||
/**
|
||||
* Adds additional headers to the provided HttpRequest.Builder. Useful for adding method/endpoint specific headers.
|
||||
*
|
||||
* @param builder the HttpRequest.Builder to which headers will be added
|
||||
* @param headers a map of header names and values to add; may be null
|
||||
* @return the same HttpRequest.Builder instance with the additional headers set
|
||||
*/
|
||||
static HttpRequest.Builder withAdditionalHeaders(HttpRequest.Builder builder, Map<String, String> headers) {
|
||||
if (headers != null) {
|
||||
for (Map.Entry<String, String> entry : headers.entrySet()) {
|
||||
builder.header(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
private final HttpClient memberVarHttpClient;
|
||||
private final ObjectMapper memberVarObjectMapper;
|
||||
private final String memberVarBaseUri;
|
||||
@@ -81,6 +101,7 @@ public class QueryApi {
|
||||
memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor();
|
||||
}
|
||||
|
||||
|
||||
protected ApiException getApiException(String operationId, HttpResponse<InputStream> response) throws IOException {
|
||||
String body = response.body() == null ? null : new String(response.body().readAllBytes());
|
||||
String message = formatExceptionMessage(operationId, response.statusCode(), body);
|
||||
@@ -151,7 +172,20 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testEnumRefString(@javax.annotation.Nullable String enumNonrefStringQuery, @javax.annotation.Nullable StringEnumRef enumRefStringQuery) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testEnumRefStringWithHttpInfo(enumNonrefStringQuery, enumRefStringQuery);
|
||||
return testEnumRefString(enumNonrefStringQuery, enumRefStringQuery, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param enumNonrefStringQuery (optional)
|
||||
* @param enumRefStringQuery (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testEnumRefString(@javax.annotation.Nullable String enumNonrefStringQuery, @javax.annotation.Nullable StringEnumRef enumRefStringQuery, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testEnumRefStringWithHttpInfo(enumNonrefStringQuery, enumRefStringQuery, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -164,7 +198,20 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testEnumRefStringWithHttpInfo(@javax.annotation.Nullable String enumNonrefStringQuery, @javax.annotation.Nullable StringEnumRef enumRefStringQuery) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testEnumRefStringRequestBuilder(enumNonrefStringQuery, enumRefStringQuery);
|
||||
return testEnumRefStringWithHttpInfo(enumNonrefStringQuery, enumRefStringQuery, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param enumNonrefStringQuery (optional)
|
||||
* @param enumRefStringQuery (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testEnumRefStringWithHttpInfo(@javax.annotation.Nullable String enumNonrefStringQuery, @javax.annotation.Nullable StringEnumRef enumRefStringQuery, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testEnumRefStringRequestBuilder(enumNonrefStringQuery, enumRefStringQuery, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -200,7 +247,7 @@ public class QueryApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testEnumRefStringRequestBuilder(@javax.annotation.Nullable String enumNonrefStringQuery, @javax.annotation.Nullable StringEnumRef enumRefStringQuery) throws ApiException {
|
||||
private HttpRequest.Builder testEnumRefStringRequestBuilder(@javax.annotation.Nullable String enumNonrefStringQuery, @javax.annotation.Nullable StringEnumRef enumRefStringQuery, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -231,6 +278,8 @@ public class QueryApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -247,7 +296,21 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryDatetimeDateString(@javax.annotation.Nullable Instant datetimeQuery, @javax.annotation.Nullable LocalDate dateQuery, @javax.annotation.Nullable String stringQuery) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryDatetimeDateStringWithHttpInfo(datetimeQuery, dateQuery, stringQuery);
|
||||
return testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param datetimeQuery (optional)
|
||||
* @param dateQuery (optional)
|
||||
* @param stringQuery (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryDatetimeDateString(@javax.annotation.Nullable Instant datetimeQuery, @javax.annotation.Nullable LocalDate dateQuery, @javax.annotation.Nullable String stringQuery, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryDatetimeDateStringWithHttpInfo(datetimeQuery, dateQuery, stringQuery, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -261,7 +324,21 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryDatetimeDateStringWithHttpInfo(@javax.annotation.Nullable Instant datetimeQuery, @javax.annotation.Nullable LocalDate dateQuery, @javax.annotation.Nullable String stringQuery) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryDatetimeDateStringRequestBuilder(datetimeQuery, dateQuery, stringQuery);
|
||||
return testQueryDatetimeDateStringWithHttpInfo(datetimeQuery, dateQuery, stringQuery, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param datetimeQuery (optional)
|
||||
* @param dateQuery (optional)
|
||||
* @param stringQuery (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryDatetimeDateStringWithHttpInfo(@javax.annotation.Nullable Instant datetimeQuery, @javax.annotation.Nullable LocalDate dateQuery, @javax.annotation.Nullable String stringQuery, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryDatetimeDateStringRequestBuilder(datetimeQuery, dateQuery, stringQuery, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -297,7 +374,7 @@ public class QueryApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testQueryDatetimeDateStringRequestBuilder(@javax.annotation.Nullable Instant datetimeQuery, @javax.annotation.Nullable LocalDate dateQuery, @javax.annotation.Nullable String stringQuery) throws ApiException {
|
||||
private HttpRequest.Builder testQueryDatetimeDateStringRequestBuilder(@javax.annotation.Nullable Instant datetimeQuery, @javax.annotation.Nullable LocalDate dateQuery, @javax.annotation.Nullable String stringQuery, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -330,6 +407,8 @@ public class QueryApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -346,7 +425,21 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryIntegerBooleanString(@javax.annotation.Nullable Integer integerQuery, @javax.annotation.Nullable Boolean booleanQuery, @javax.annotation.Nullable String stringQuery) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryIntegerBooleanStringWithHttpInfo(integerQuery, booleanQuery, stringQuery);
|
||||
return testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param integerQuery (optional)
|
||||
* @param booleanQuery (optional)
|
||||
* @param stringQuery (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryIntegerBooleanString(@javax.annotation.Nullable Integer integerQuery, @javax.annotation.Nullable Boolean booleanQuery, @javax.annotation.Nullable String stringQuery, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryIntegerBooleanStringWithHttpInfo(integerQuery, booleanQuery, stringQuery, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -360,7 +453,21 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryIntegerBooleanStringWithHttpInfo(@javax.annotation.Nullable Integer integerQuery, @javax.annotation.Nullable Boolean booleanQuery, @javax.annotation.Nullable String stringQuery) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryIntegerBooleanStringRequestBuilder(integerQuery, booleanQuery, stringQuery);
|
||||
return testQueryIntegerBooleanStringWithHttpInfo(integerQuery, booleanQuery, stringQuery, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param integerQuery (optional)
|
||||
* @param booleanQuery (optional)
|
||||
* @param stringQuery (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryIntegerBooleanStringWithHttpInfo(@javax.annotation.Nullable Integer integerQuery, @javax.annotation.Nullable Boolean booleanQuery, @javax.annotation.Nullable String stringQuery, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryIntegerBooleanStringRequestBuilder(integerQuery, booleanQuery, stringQuery, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -396,7 +503,7 @@ public class QueryApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testQueryIntegerBooleanStringRequestBuilder(@javax.annotation.Nullable Integer integerQuery, @javax.annotation.Nullable Boolean booleanQuery, @javax.annotation.Nullable String stringQuery) throws ApiException {
|
||||
private HttpRequest.Builder testQueryIntegerBooleanStringRequestBuilder(@javax.annotation.Nullable Integer integerQuery, @javax.annotation.Nullable Boolean booleanQuery, @javax.annotation.Nullable String stringQuery, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -429,6 +536,8 @@ public class QueryApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -443,7 +552,19 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleDeepObjectExplodeTrueObject(@javax.annotation.Nullable Pet queryObject) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(queryObject);
|
||||
return testQueryStyleDeepObjectExplodeTrueObject(queryObject, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param queryObject (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleDeepObjectExplodeTrueObject(@javax.annotation.Nullable Pet queryObject, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(queryObject, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -455,7 +576,19 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(@javax.annotation.Nullable Pet queryObject) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryStyleDeepObjectExplodeTrueObjectRequestBuilder(queryObject);
|
||||
return testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(queryObject, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param queryObject (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(@javax.annotation.Nullable Pet queryObject, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryStyleDeepObjectExplodeTrueObjectRequestBuilder(queryObject, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -491,7 +624,7 @@ public class QueryApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testQueryStyleDeepObjectExplodeTrueObjectRequestBuilder(@javax.annotation.Nullable Pet queryObject) throws ApiException {
|
||||
private HttpRequest.Builder testQueryStyleDeepObjectExplodeTrueObjectRequestBuilder(@javax.annotation.Nullable Pet queryObject, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -525,6 +658,8 @@ public class QueryApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -539,7 +674,19 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleDeepObjectExplodeTrueObjectAllOf(@javax.annotation.Nullable TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(queryObject);
|
||||
return testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param queryObject (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleDeepObjectExplodeTrueObjectAllOf(@javax.annotation.Nullable TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(queryObject, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -551,7 +698,19 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(@javax.annotation.Nullable TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryStyleDeepObjectExplodeTrueObjectAllOfRequestBuilder(queryObject);
|
||||
return testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(queryObject, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param queryObject (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(@javax.annotation.Nullable TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryStyleDeepObjectExplodeTrueObjectAllOfRequestBuilder(queryObject, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -587,7 +746,7 @@ public class QueryApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testQueryStyleDeepObjectExplodeTrueObjectAllOfRequestBuilder(@javax.annotation.Nullable TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws ApiException {
|
||||
private HttpRequest.Builder testQueryStyleDeepObjectExplodeTrueObjectAllOfRequestBuilder(@javax.annotation.Nullable TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -621,6 +780,8 @@ public class QueryApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -635,7 +796,19 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleFormExplodeFalseArrayInteger(@javax.annotation.Nullable List<Integer> queryObject) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo(queryObject);
|
||||
return testQueryStyleFormExplodeFalseArrayInteger(queryObject, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param queryObject (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleFormExplodeFalseArrayInteger(@javax.annotation.Nullable List<Integer> queryObject, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo(queryObject, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -647,7 +820,19 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo(@javax.annotation.Nullable List<Integer> queryObject) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryStyleFormExplodeFalseArrayIntegerRequestBuilder(queryObject);
|
||||
return testQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo(queryObject, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param queryObject (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo(@javax.annotation.Nullable List<Integer> queryObject, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryStyleFormExplodeFalseArrayIntegerRequestBuilder(queryObject, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -683,7 +868,7 @@ public class QueryApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testQueryStyleFormExplodeFalseArrayIntegerRequestBuilder(@javax.annotation.Nullable List<Integer> queryObject) throws ApiException {
|
||||
private HttpRequest.Builder testQueryStyleFormExplodeFalseArrayIntegerRequestBuilder(@javax.annotation.Nullable List<Integer> queryObject, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -712,6 +897,8 @@ public class QueryApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -726,7 +913,19 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleFormExplodeFalseArrayString(@javax.annotation.Nullable List<String> queryObject) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryStyleFormExplodeFalseArrayStringWithHttpInfo(queryObject);
|
||||
return testQueryStyleFormExplodeFalseArrayString(queryObject, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param queryObject (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleFormExplodeFalseArrayString(@javax.annotation.Nullable List<String> queryObject, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryStyleFormExplodeFalseArrayStringWithHttpInfo(queryObject, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -738,7 +937,19 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryStyleFormExplodeFalseArrayStringWithHttpInfo(@javax.annotation.Nullable List<String> queryObject) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryStyleFormExplodeFalseArrayStringRequestBuilder(queryObject);
|
||||
return testQueryStyleFormExplodeFalseArrayStringWithHttpInfo(queryObject, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param queryObject (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryStyleFormExplodeFalseArrayStringWithHttpInfo(@javax.annotation.Nullable List<String> queryObject, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryStyleFormExplodeFalseArrayStringRequestBuilder(queryObject, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -774,7 +985,7 @@ public class QueryApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testQueryStyleFormExplodeFalseArrayStringRequestBuilder(@javax.annotation.Nullable List<String> queryObject) throws ApiException {
|
||||
private HttpRequest.Builder testQueryStyleFormExplodeFalseArrayStringRequestBuilder(@javax.annotation.Nullable List<String> queryObject, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -803,6 +1014,8 @@ public class QueryApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -817,7 +1030,19 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleFormExplodeTrueArrayString(@javax.annotation.Nullable TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(queryObject);
|
||||
return testQueryStyleFormExplodeTrueArrayString(queryObject, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param queryObject (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleFormExplodeTrueArrayString(@javax.annotation.Nullable TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(queryObject, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -829,7 +1054,19 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(@javax.annotation.Nullable TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryStyleFormExplodeTrueArrayStringRequestBuilder(queryObject);
|
||||
return testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(queryObject, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param queryObject (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(@javax.annotation.Nullable TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryStyleFormExplodeTrueArrayStringRequestBuilder(queryObject, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -865,7 +1102,7 @@ public class QueryApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testQueryStyleFormExplodeTrueArrayStringRequestBuilder(@javax.annotation.Nullable TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject) throws ApiException {
|
||||
private HttpRequest.Builder testQueryStyleFormExplodeTrueArrayStringRequestBuilder(@javax.annotation.Nullable TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -894,6 +1131,8 @@ public class QueryApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -908,7 +1147,19 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleFormExplodeTrueObject(@javax.annotation.Nullable Pet queryObject) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryStyleFormExplodeTrueObjectWithHttpInfo(queryObject);
|
||||
return testQueryStyleFormExplodeTrueObject(queryObject, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param queryObject (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleFormExplodeTrueObject(@javax.annotation.Nullable Pet queryObject, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryStyleFormExplodeTrueObjectWithHttpInfo(queryObject, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -920,7 +1171,19 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryStyleFormExplodeTrueObjectWithHttpInfo(@javax.annotation.Nullable Pet queryObject) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryStyleFormExplodeTrueObjectRequestBuilder(queryObject);
|
||||
return testQueryStyleFormExplodeTrueObjectWithHttpInfo(queryObject, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param queryObject (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryStyleFormExplodeTrueObjectWithHttpInfo(@javax.annotation.Nullable Pet queryObject, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryStyleFormExplodeTrueObjectRequestBuilder(queryObject, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -956,7 +1219,7 @@ public class QueryApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testQueryStyleFormExplodeTrueObjectRequestBuilder(@javax.annotation.Nullable Pet queryObject) throws ApiException {
|
||||
private HttpRequest.Builder testQueryStyleFormExplodeTrueObjectRequestBuilder(@javax.annotation.Nullable Pet queryObject, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -990,6 +1253,8 @@ public class QueryApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
@@ -1004,7 +1269,19 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleFormExplodeTrueObjectAllOf(@javax.annotation.Nullable DataQuery queryObject) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(queryObject);
|
||||
return testQueryStyleFormExplodeTrueObjectAllOf(queryObject, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param queryObject (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleFormExplodeTrueObjectAllOf(@javax.annotation.Nullable DataQuery queryObject, Map<String, String> headers) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(queryObject, headers);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
|
||||
@@ -1016,7 +1293,19 @@ public class QueryApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(@javax.annotation.Nullable DataQuery queryObject) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryStyleFormExplodeTrueObjectAllOfRequestBuilder(queryObject);
|
||||
return testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(queryObject, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param queryObject (optional)
|
||||
* @param headers Optional headers to include in the request
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(@javax.annotation.Nullable DataQuery queryObject, Map<String, String> headers) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryStyleFormExplodeTrueObjectAllOfRequestBuilder(queryObject, headers);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
localVarRequestBuilder.build(),
|
||||
@@ -1052,7 +1341,7 @@ public class QueryApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testQueryStyleFormExplodeTrueObjectAllOfRequestBuilder(@javax.annotation.Nullable DataQuery queryObject) throws ApiException {
|
||||
private HttpRequest.Builder testQueryStyleFormExplodeTrueObjectAllOfRequestBuilder(@javax.annotation.Nullable DataQuery queryObject, Map<String, String> headers) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -1081,6 +1370,8 @@ public class QueryApi {
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
// Add custom headers if provided
|
||||
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user