Skip to content

Commit 8deecbc

Browse files
updated generated files to new default value
1 parent 67c96ca commit 8deecbc

File tree

39 files changed

+280
-260
lines changed

39 files changed

+280
-260
lines changed

docs/generators/java-microprofile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
105105
|useRxJava3|Whether to use the RxJava3 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.| |false|
106106
|useSealedOneOfInterfaces|Generate the oneOf interfaces as sealed interfaces. Only supported for WebClient and RestClient.| |false|
107107
|useSingleRequestParameter|Setting this property to "true" will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter. ONLY native, jersey2, jersey3, okhttp-gson, microprofile, Spring RestClient, Spring WebClient support this option. Setting this property to "static" does the same as "true", but also makes the generated arguments class static with single parameter instantiation.| |false|
108-
|useUnaryInterceptor|If true it will generate ResponseInterceptors using a UnaryOperator. This can be usefull for manipulating the request before it gets passed, for example doing your own decryption| |true|
108+
|useUnaryInterceptor|If true it will generate ResponseInterceptors using a UnaryOperator. This can be usefull for manipulating the request before it gets passed, for example doing your own decryption| |false|
109109
|webclientBlockingOperations|Making all WebClient operations blocking(sync). Note that if on operation 'x-webclient-blocking: false' then such operation won't be sync| |false|
110110
|withAWSV4Signature|whether to include AWS v4 signature support (only available for okhttp-gson library)| |false|
111111
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|

docs/generators/java.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
105105
|useRxJava3|Whether to use the RxJava3 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.| |false|
106106
|useSealedOneOfInterfaces|Generate the oneOf interfaces as sealed interfaces. Only supported for WebClient and RestClient.| |false|
107107
|useSingleRequestParameter|Setting this property to "true" will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter. ONLY native, jersey2, jersey3, okhttp-gson, microprofile, Spring RestClient, Spring WebClient support this option. Setting this property to "static" does the same as "true", but also makes the generated arguments class static with single parameter instantiation.| |false|
108-
|useUnaryInterceptor|If true it will generate ResponseInterceptors using a UnaryOperator. This can be usefull for manipulating the request before it gets passed, for example doing your own decryption| |true|
108+
|useUnaryInterceptor|If true it will generate ResponseInterceptors using a UnaryOperator. This can be usefull for manipulating the request before it gets passed, for example doing your own decryption| |false|
109109
|webclientBlockingOperations|Making all WebClient operations blocking(sync). Note that if on operation 'x-webclient-blocking: false' then such operation won't be sync| |false|
110110
|withAWSV4Signature|whether to include AWS v4 signature support (only available for okhttp-gson library)| |false|
111111
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|

samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ApiClient.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import java.util.Optional;
3939
import java.util.zip.GZIPInputStream;
4040
import java.util.stream.Collectors;
41-
import java.util.function.UnaryOperator;
41+
4242
import static java.nio.charset.StandardCharsets.UTF_8;
4343

4444
/**
@@ -64,8 +64,8 @@ public class ApiClient {
6464
protected int port;
6565
protected String basePath;
6666
protected Consumer<HttpRequest.Builder> interceptor;
67-
protected UnaryOperator<HttpResponse<InputStream>> responseInterceptor;
68-
protected UnaryOperator<HttpResponse<InputStream>> asyncResponseInterceptor;
67+
protected Consumer<HttpResponse<InputStream>> responseInterceptor;
68+
protected Consumer<HttpResponse<InputStream>> asyncResponseInterceptor;
6969

7070
protected Duration readTimeout;
7171
protected Duration connectTimeout;
@@ -365,7 +365,7 @@ public Consumer<HttpRequest.Builder> getRequestInterceptor() {
365365
* of null resets the interceptor to a no-op.
366366
* @return This object.
367367
*/
368-
public ApiClient setResponseInterceptor(UnaryOperator<HttpResponse<InputStream>> interceptor) {
368+
public ApiClient setResponseInterceptor(Consumer<HttpResponse<InputStream>> interceptor) {
369369
this.responseInterceptor = interceptor;
370370
return this;
371371
}
@@ -375,7 +375,7 @@ public ApiClient setResponseInterceptor(UnaryOperator<HttpResponse<InputStream>>
375375
*
376376
* @return The custom interceptor that was set, or null if there isn't any.
377377
*/
378-
public UnaryOperator<HttpResponse<InputStream>> getResponseInterceptor() {
378+
public Consumer<HttpResponse<InputStream>> getResponseInterceptor() {
379379
return responseInterceptor;
380380
}
381381

@@ -388,7 +388,7 @@ public UnaryOperator<HttpResponse<InputStream>> getResponseInterceptor() {
388388
* of null resets the interceptor to a no-op.
389389
* @return This object.
390390
*/
391-
public ApiClient setAsyncResponseInterceptor(UnaryOperator<HttpResponse<InputStream>> interceptor) {
391+
public ApiClient setAsyncResponseInterceptor(Consumer<HttpResponse<InputStream>> interceptor) {
392392
this.asyncResponseInterceptor = interceptor;
393393
return this;
394394
}
@@ -398,7 +398,7 @@ public ApiClient setAsyncResponseInterceptor(UnaryOperator<HttpResponse<InputStr
398398
*
399399
* @return The custom interceptor that was set, or null if there isn't any.
400400
*/
401-
public UnaryOperator<HttpResponse<InputStream>> getAsyncResponseInterceptor() {
401+
public Consumer<HttpResponse<InputStream>> getAsyncResponseInterceptor() {
402402
return asyncResponseInterceptor;
403403
}
404404

samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/AuthApi.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
import java.util.Map;
4444
import java.util.Set;
4545
import java.util.Locale;
46-
import java.util.function.UnaryOperator;
46+
4747
import java.util.function.Consumer;
4848

4949
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.18.0-SNAPSHOT")
@@ -73,8 +73,8 @@ static HttpRequest.Builder withAdditionalHeaders(HttpRequest.Builder builder, Ma
7373
private final String memberVarBaseUri;
7474
private final Consumer<HttpRequest.Builder> memberVarInterceptor;
7575
private final Duration memberVarReadTimeout;
76-
private final UnaryOperator<HttpResponse<InputStream>> memberVarResponseInterceptor;
77-
private final UnaryOperator<HttpResponse<InputStream>> memberVarAsyncResponseInterceptor;
76+
private final Consumer<HttpResponse<InputStream>> memberVarResponseInterceptor;
77+
private final Consumer<HttpResponse<InputStream>> memberVarAsyncResponseInterceptor;
7878

7979
public AuthApi() {
8080
this(Configuration.getDefaultApiClient());
@@ -209,7 +209,7 @@ public ApiResponse<String> testAuthHttpBasicWithHttpInfo(Map<String, String> hea
209209
localVarRequestBuilder.build(),
210210
HttpResponse.BodyHandlers.ofInputStream());
211211
if (memberVarResponseInterceptor != null) {
212-
localVarResponse = memberVarResponseInterceptor.apply(localVarResponse);
212+
memberVarResponseInterceptor.accept(localVarResponse);
213213
}
214214
InputStream localVarResponseBody = null;
215215
try {
@@ -312,7 +312,7 @@ public ApiResponse<String> testAuthHttpBearerWithHttpInfo(Map<String, String> he
312312
localVarRequestBuilder.build(),
313313
HttpResponse.BodyHandlers.ofInputStream());
314314
if (memberVarResponseInterceptor != null) {
315-
localVarResponse = memberVarResponseInterceptor.apply(localVarResponse);
315+
memberVarResponseInterceptor.accept(localVarResponse);
316316
}
317317
InputStream localVarResponseBody = null;
318318
try {

samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/BodyApi.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
import java.util.Map;
5454
import java.util.Set;
5555
import java.util.Locale;
56-
import java.util.function.UnaryOperator;
56+
5757
import java.util.function.Consumer;
5858

5959
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.18.0-SNAPSHOT")
@@ -83,8 +83,8 @@ static HttpRequest.Builder withAdditionalHeaders(HttpRequest.Builder builder, Ma
8383
private final String memberVarBaseUri;
8484
private final Consumer<HttpRequest.Builder> memberVarInterceptor;
8585
private final Duration memberVarReadTimeout;
86-
private final UnaryOperator<HttpResponse<InputStream>> memberVarResponseInterceptor;
87-
private final UnaryOperator<HttpResponse<InputStream>> memberVarAsyncResponseInterceptor;
86+
private final Consumer<HttpResponse<InputStream>> memberVarResponseInterceptor;
87+
private final Consumer<HttpResponse<InputStream>> memberVarAsyncResponseInterceptor;
8888

8989
public BodyApi() {
9090
this(Configuration.getDefaultApiClient());
@@ -219,7 +219,7 @@ public ApiResponse<File> testBinaryGifWithHttpInfo(Map<String, String> headers)
219219
localVarRequestBuilder.build(),
220220
HttpResponse.BodyHandlers.ofInputStream());
221221
if (memberVarResponseInterceptor != null) {
222-
localVarResponse = memberVarResponseInterceptor.apply(localVarResponse);
222+
memberVarResponseInterceptor.accept(localVarResponse);
223223
}
224224
InputStream localVarResponseBody = null;
225225
try {
@@ -331,7 +331,7 @@ public ApiResponse<String> testBodyApplicationOctetstreamBinaryWithHttpInfo(@jav
331331
localVarRequestBuilder.build(),
332332
HttpResponse.BodyHandlers.ofInputStream());
333333
if (memberVarResponseInterceptor != null) {
334-
localVarResponse = memberVarResponseInterceptor.apply(localVarResponse);
334+
memberVarResponseInterceptor.accept(localVarResponse);
335335
}
336336
InputStream localVarResponseBody = null;
337337
try {
@@ -444,7 +444,7 @@ public ApiResponse<String> testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(@j
444444
localVarRequestBuilder.build(),
445445
HttpResponse.BodyHandlers.ofInputStream());
446446
if (memberVarResponseInterceptor != null) {
447-
localVarResponse = memberVarResponseInterceptor.apply(localVarResponse);
447+
memberVarResponseInterceptor.accept(localVarResponse);
448448
}
449449
InputStream localVarResponseBody = null;
450450
try {
@@ -591,7 +591,7 @@ public ApiResponse<String> testBodyMultipartFormdataSingleBinaryWithHttpInfo(@ja
591591
localVarRequestBuilder.build(),
592592
HttpResponse.BodyHandlers.ofInputStream());
593593
if (memberVarResponseInterceptor != null) {
594-
localVarResponse = memberVarResponseInterceptor.apply(localVarResponse);
594+
memberVarResponseInterceptor.accept(localVarResponse);
595595
}
596596
InputStream localVarResponseBody = null;
597597
try {
@@ -732,7 +732,7 @@ public ApiResponse<Pet> testEchoBodyAllOfPetWithHttpInfo(@javax.annotation.Nulla
732732
localVarRequestBuilder.build(),
733733
HttpResponse.BodyHandlers.ofInputStream());
734734
if (memberVarResponseInterceptor != null) {
735-
localVarResponse = memberVarResponseInterceptor.apply(localVarResponse);
735+
memberVarResponseInterceptor.accept(localVarResponse);
736736
}
737737
InputStream localVarResponseBody = null;
738738
try {
@@ -851,7 +851,7 @@ public ApiResponse<String> testEchoBodyFreeFormObjectResponseStringWithHttpInfo(
851851
localVarRequestBuilder.build(),
852852
HttpResponse.BodyHandlers.ofInputStream());
853853
if (memberVarResponseInterceptor != null) {
854-
localVarResponse = memberVarResponseInterceptor.apply(localVarResponse);
854+
memberVarResponseInterceptor.accept(localVarResponse);
855855
}
856856
InputStream localVarResponseBody = null;
857857
try {
@@ -964,7 +964,7 @@ public ApiResponse<Pet> testEchoBodyPetWithHttpInfo(@javax.annotation.Nullable P
964964
localVarRequestBuilder.build(),
965965
HttpResponse.BodyHandlers.ofInputStream());
966966
if (memberVarResponseInterceptor != null) {
967-
localVarResponse = memberVarResponseInterceptor.apply(localVarResponse);
967+
memberVarResponseInterceptor.accept(localVarResponse);
968968
}
969969
InputStream localVarResponseBody = null;
970970
try {
@@ -1083,7 +1083,7 @@ public ApiResponse<String> testEchoBodyPetResponseStringWithHttpInfo(@javax.anno
10831083
localVarRequestBuilder.build(),
10841084
HttpResponse.BodyHandlers.ofInputStream());
10851085
if (memberVarResponseInterceptor != null) {
1086-
localVarResponse = memberVarResponseInterceptor.apply(localVarResponse);
1086+
memberVarResponseInterceptor.accept(localVarResponse);
10871087
}
10881088
InputStream localVarResponseBody = null;
10891089
try {
@@ -1196,7 +1196,7 @@ public ApiResponse<StringEnumRef> testEchoBodyStringEnumWithHttpInfo(@javax.anno
11961196
localVarRequestBuilder.build(),
11971197
HttpResponse.BodyHandlers.ofInputStream());
11981198
if (memberVarResponseInterceptor != null) {
1199-
localVarResponse = memberVarResponseInterceptor.apply(localVarResponse);
1199+
memberVarResponseInterceptor.accept(localVarResponse);
12001200
}
12011201
InputStream localVarResponseBody = null;
12021202
try {
@@ -1315,7 +1315,7 @@ public ApiResponse<String> testEchoBodyTagResponseStringWithHttpInfo(@javax.anno
13151315
localVarRequestBuilder.build(),
13161316
HttpResponse.BodyHandlers.ofInputStream());
13171317
if (memberVarResponseInterceptor != null) {
1318-
localVarResponse = memberVarResponseInterceptor.apply(localVarResponse);
1318+
memberVarResponseInterceptor.accept(localVarResponse);
13191319
}
13201320
InputStream localVarResponseBody = null;
13211321
try {

samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/FormApi.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
import java.util.Map;
5151
import java.util.Set;
5252
import java.util.Locale;
53-
import java.util.function.UnaryOperator;
53+
5454
import java.util.function.Consumer;
5555

5656
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.18.0-SNAPSHOT")
@@ -80,8 +80,8 @@ static HttpRequest.Builder withAdditionalHeaders(HttpRequest.Builder builder, Ma
8080
private final String memberVarBaseUri;
8181
private final Consumer<HttpRequest.Builder> memberVarInterceptor;
8282
private final Duration memberVarReadTimeout;
83-
private final UnaryOperator<HttpResponse<InputStream>> memberVarResponseInterceptor;
84-
private final UnaryOperator<HttpResponse<InputStream>> memberVarAsyncResponseInterceptor;
83+
private final Consumer<HttpResponse<InputStream>> memberVarResponseInterceptor;
84+
private final Consumer<HttpResponse<InputStream>> memberVarAsyncResponseInterceptor;
8585

8686
public FormApi() {
8787
this(Configuration.getDefaultApiClient());
@@ -228,7 +228,7 @@ public ApiResponse<String> testFormIntegerBooleanStringWithHttpInfo(@javax.annot
228228
localVarRequestBuilder.build(),
229229
HttpResponse.BodyHandlers.ofInputStream());
230230
if (memberVarResponseInterceptor != null) {
231-
localVarResponse = memberVarResponseInterceptor.apply(localVarResponse);
231+
memberVarResponseInterceptor.accept(localVarResponse);
232232
}
233233
InputStream localVarResponseBody = null;
234234
try {
@@ -356,7 +356,7 @@ public ApiResponse<String> testFormObjectMultipartWithHttpInfo(@javax.annotation
356356
localVarRequestBuilder.build(),
357357
HttpResponse.BodyHandlers.ofInputStream());
358358
if (memberVarResponseInterceptor != null) {
359-
localVarResponse = memberVarResponseInterceptor.apply(localVarResponse);
359+
memberVarResponseInterceptor.accept(localVarResponse);
360360
}
361361
InputStream localVarResponseBody = null;
362362
try {
@@ -522,7 +522,7 @@ public ApiResponse<String> testFormOneofWithHttpInfo(@javax.annotation.Nullable
522522
localVarRequestBuilder.build(),
523523
HttpResponse.BodyHandlers.ofInputStream());
524524
if (memberVarResponseInterceptor != null) {
525-
localVarResponse = memberVarResponseInterceptor.apply(localVarResponse);
525+
memberVarResponseInterceptor.accept(localVarResponse);
526526
}
527527
InputStream localVarResponseBody = null;
528528
try {

samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/HeaderApi.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
import java.util.Map;
5151
import java.util.Set;
5252
import java.util.Locale;
53-
import java.util.function.UnaryOperator;
53+
5454
import java.util.function.Consumer;
5555

5656
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.18.0-SNAPSHOT")
@@ -80,8 +80,8 @@ static HttpRequest.Builder withAdditionalHeaders(HttpRequest.Builder builder, Ma
8080
private final String memberVarBaseUri;
8181
private final Consumer<HttpRequest.Builder> memberVarInterceptor;
8282
private final Duration memberVarReadTimeout;
83-
private final UnaryOperator<HttpResponse<InputStream>> memberVarResponseInterceptor;
84-
private final UnaryOperator<HttpResponse<InputStream>> memberVarAsyncResponseInterceptor;
83+
private final Consumer<HttpResponse<InputStream>> memberVarResponseInterceptor;
84+
private final Consumer<HttpResponse<InputStream>> memberVarAsyncResponseInterceptor;
8585

8686
public HeaderApi() {
8787
this(Configuration.getDefaultApiClient());
@@ -236,7 +236,7 @@ public ApiResponse<String> testHeaderIntegerBooleanStringEnumsWithHttpInfo(@java
236236
localVarRequestBuilder.build(),
237237
HttpResponse.BodyHandlers.ofInputStream());
238238
if (memberVarResponseInterceptor != null) {
239-
localVarResponse = memberVarResponseInterceptor.apply(localVarResponse);
239+
memberVarResponseInterceptor.accept(localVarResponse);
240240
}
241241
InputStream localVarResponseBody = null;
242242
try {

samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/PathApi.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
import java.util.Map;
5151
import java.util.Set;
5252
import java.util.Locale;
53-
import java.util.function.UnaryOperator;
53+
5454
import java.util.function.Consumer;
5555

5656
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.18.0-SNAPSHOT")
@@ -80,8 +80,8 @@ static HttpRequest.Builder withAdditionalHeaders(HttpRequest.Builder builder, Ma
8080
private final String memberVarBaseUri;
8181
private final Consumer<HttpRequest.Builder> memberVarInterceptor;
8282
private final Duration memberVarReadTimeout;
83-
private final UnaryOperator<HttpResponse<InputStream>> memberVarResponseInterceptor;
84-
private final UnaryOperator<HttpResponse<InputStream>> memberVarAsyncResponseInterceptor;
83+
private final Consumer<HttpResponse<InputStream>> memberVarResponseInterceptor;
84+
private final Consumer<HttpResponse<InputStream>> memberVarAsyncResponseInterceptor;
8585

8686
public PathApi() {
8787
this(Configuration.getDefaultApiClient());
@@ -232,7 +232,7 @@ public ApiResponse<String> testsPathStringPathStringIntegerPathIntegerEnumNonref
232232
localVarRequestBuilder.build(),
233233
HttpResponse.BodyHandlers.ofInputStream());
234234
if (memberVarResponseInterceptor != null) {
235-
localVarResponse = memberVarResponseInterceptor.apply(localVarResponse);
235+
memberVarResponseInterceptor.accept(localVarResponse);
236236
}
237237
InputStream localVarResponseBody = null;
238238
try {

0 commit comments

Comments
 (0)