+ * Note: This might be replaced by utility method from commons-lang or guava someday + * if one of those libraries is added as dependency. + *
+ * + * @param array The array of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(String[] array, String separator) { + int len = array.length; + if (len == 0) { + return ""; + } + + StringBuilder out = new StringBuilder(); + out.append(array[0]); + for (int i = 1; i < len; i++) { + out.append(separator).append(array[i]); + } + return out.toString(); + } + + /** + * Join a list of strings with the given separator. + * + * @param list The list of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(Collection200 - successful operation
+ * @param client client model
+ * @return Client
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec call123testSpecialTagsRequestCreation(Client client) throws WebClientResponseException {
+ Object postBody = client;
+ // verify the required parameter 'client' is set
+ if (client == null) {
+ throw new WebClientResponseException("Missing the required parameter 'client' when calling call123testSpecialTags", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
+ }
+ // create path and map variables
+ final Map 200 - successful operation
+ * @param client client model
+ * @return Client
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public Mono 200 - successful operation
+ * @param client client model
+ * @return ResponseEntity<Client>
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public Mono 200 - successful operation
+ * @param client client model
+ * @return ResponseSpec
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseSpec call123testSpecialTagsWithResponseSpec(Client client) throws WebClientResponseException {
+ return call123testSpecialTagsRequestCreation(client);
+ }
+}
diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/api/DefaultApi.java
new file mode 100644
index 00000000000..4cb2d86625e
--- /dev/null
+++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/api/DefaultApi.java
@@ -0,0 +1,113 @@
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+
+import org.openapitools.client.model.FooGetDefaultResponse;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.web.reactive.function.client.WebClient.ResponseSpec;
+import org.springframework.web.reactive.function.client.WebClientResponseException;
+import org.springframework.core.io.FileSystemResource;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import reactor.core.publisher.Mono;
+import reactor.core.publisher.Flux;
+
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class DefaultApi {
+ private ApiClient apiClient;
+
+ public DefaultApi() {
+ this(new ApiClient());
+ }
+
+ @Autowired
+ public DefaultApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ *
+ *
+ * 0 - response
+ * @return FooGetDefaultResponse
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec fooGetRequestCreation() throws WebClientResponseException {
+ Object postBody = null;
+ // create path and map variables
+ final Map 0 - response
+ * @return FooGetDefaultResponse
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public Mono 0 - response
+ * @return ResponseEntity<FooGetDefaultResponse>
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public Mono 0 - response
+ * @return ResponseSpec
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseSpec fooGetWithResponseSpec() throws WebClientResponseException {
+ return fooGetRequestCreation();
+ }
+}
diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/api/FakeApi.java
new file mode 100644
index 00000000000..cbb1804a495
--- /dev/null
+++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/api/FakeApi.java
@@ -0,0 +1,1506 @@
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+
+import java.math.BigDecimal;
+import org.openapitools.client.model.Client;
+import org.openapitools.client.model.EnumClass;
+import java.io.File;
+import org.openapitools.client.model.FileSchemaTestClass;
+import org.openapitools.client.model.HealthCheckResult;
+import java.time.LocalDate;
+import java.time.OffsetDateTime;
+import org.openapitools.client.model.OuterComposite;
+import org.openapitools.client.model.OuterObjectWithEnumProperty;
+import org.openapitools.client.model.Pet;
+import org.openapitools.client.model.User;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.web.reactive.function.client.WebClient.ResponseSpec;
+import org.springframework.web.reactive.function.client.WebClientResponseException;
+import org.springframework.core.io.FileSystemResource;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import reactor.core.publisher.Mono;
+import reactor.core.publisher.Flux;
+
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class FakeApi {
+ private ApiClient apiClient;
+
+ public FakeApi() {
+ this(new ApiClient());
+ }
+
+ @Autowired
+ public FakeApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Health check endpoint
+ *
+ * 200 - The instance started successfully
+ * @return HealthCheckResult
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec fakeHealthGetRequestCreation() throws WebClientResponseException {
+ Object postBody = null;
+ // create path and map variables
+ final Map 200 - The instance started successfully
+ * @return HealthCheckResult
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public Mono 200 - The instance started successfully
+ * @return ResponseEntity<HealthCheckResult>
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public Mono 200 - The instance started successfully
+ * @return ResponseSpec
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseSpec fakeHealthGetWithResponseSpec() throws WebClientResponseException {
+ return fakeHealthGetRequestCreation();
+ }
+ /**
+ * test http signature authentication
+ *
+ * 200 - The instance started successfully
+ * @param pet Pet object that needs to be added to the store
+ * @param query1 query parameter
+ * @param header1 header parameter
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec fakeHttpSignatureTestRequestCreation(Pet pet, String query1, String header1) throws WebClientResponseException {
+ Object postBody = pet;
+ // verify the required parameter 'pet' is set
+ if (pet == null) {
+ throw new WebClientResponseException("Missing the required parameter 'pet' when calling fakeHttpSignatureTest", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
+ }
+ // create path and map variables
+ final Map 200 - The instance started successfully
+ * @param pet Pet object that needs to be added to the store
+ * @param query1 query parameter
+ * @param header1 header parameter
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public Mono 200 - The instance started successfully
+ * @param pet Pet object that needs to be added to the store
+ * @param query1 query parameter
+ * @param header1 header parameter
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public Mono 200 - The instance started successfully
+ * @param pet Pet object that needs to be added to the store
+ * @param query1 query parameter
+ * @param header1 header parameter
+ * @return ResponseSpec
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseSpec fakeHttpSignatureTestWithResponseSpec(Pet pet, String query1, String header1) throws WebClientResponseException {
+ return fakeHttpSignatureTestRequestCreation(pet, query1, header1);
+ }
+ /**
+ *
+ * Test serialization of outer boolean types
+ * 200 - Output boolean
+ * @param body Input boolean as post body
+ * @return Boolean
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec fakeOuterBooleanSerializeRequestCreation(Boolean body) throws WebClientResponseException {
+ Object postBody = body;
+ // create path and map variables
+ final Map 200 - Output boolean
+ * @param body Input boolean as post body
+ * @return Boolean
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public Mono 200 - Output boolean
+ * @param body Input boolean as post body
+ * @return ResponseEntity<Boolean>
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public Mono 200 - Output boolean
+ * @param body Input boolean as post body
+ * @return ResponseSpec
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseSpec fakeOuterBooleanSerializeWithResponseSpec(Boolean body) throws WebClientResponseException {
+ return fakeOuterBooleanSerializeRequestCreation(body);
+ }
+ /**
+ *
+ * Test serialization of object with outer number type
+ * 200 - Output composite
+ * @param outerComposite Input composite as post body
+ * @return OuterComposite
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec fakeOuterCompositeSerializeRequestCreation(OuterComposite outerComposite) throws WebClientResponseException {
+ Object postBody = outerComposite;
+ // create path and map variables
+ final Map 200 - Output composite
+ * @param outerComposite Input composite as post body
+ * @return OuterComposite
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public Mono 200 - Output composite
+ * @param outerComposite Input composite as post body
+ * @return ResponseEntity<OuterComposite>
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public Mono 200 - Output composite
+ * @param outerComposite Input composite as post body
+ * @return ResponseSpec
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseSpec fakeOuterCompositeSerializeWithResponseSpec(OuterComposite outerComposite) throws WebClientResponseException {
+ return fakeOuterCompositeSerializeRequestCreation(outerComposite);
+ }
+ /**
+ *
+ * Test serialization of outer number types
+ * 200 - Output number
+ * @param body Input number as post body
+ * @return BigDecimal
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec fakeOuterNumberSerializeRequestCreation(BigDecimal body) throws WebClientResponseException {
+ Object postBody = body;
+ // create path and map variables
+ final Map 200 - Output number
+ * @param body Input number as post body
+ * @return BigDecimal
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public Mono 200 - Output number
+ * @param body Input number as post body
+ * @return ResponseEntity<BigDecimal>
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public Mono 200 - Output number
+ * @param body Input number as post body
+ * @return ResponseSpec
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseSpec fakeOuterNumberSerializeWithResponseSpec(BigDecimal body) throws WebClientResponseException {
+ return fakeOuterNumberSerializeRequestCreation(body);
+ }
+ /**
+ *
+ * Test serialization of outer string types
+ * 200 - Output string
+ * @param body Input string as post body
+ * @return String
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec fakeOuterStringSerializeRequestCreation(String body) throws WebClientResponseException {
+ Object postBody = body;
+ // create path and map variables
+ final Map 200 - Output string
+ * @param body Input string as post body
+ * @return String
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public Mono 200 - Output string
+ * @param body Input string as post body
+ * @return ResponseEntity<String>
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public Mono 200 - Output string
+ * @param body Input string as post body
+ * @return ResponseSpec
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseSpec fakeOuterStringSerializeWithResponseSpec(String body) throws WebClientResponseException {
+ return fakeOuterStringSerializeRequestCreation(body);
+ }
+ /**
+ *
+ * Test serialization of enum (int) properties with examples
+ * 200 - Output enum (int)
+ * @param outerObjectWithEnumProperty Input enum (int) as post body
+ * @return OuterObjectWithEnumProperty
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec fakePropertyEnumIntegerSerializeRequestCreation(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws WebClientResponseException {
+ Object postBody = outerObjectWithEnumProperty;
+ // verify the required parameter 'outerObjectWithEnumProperty' is set
+ if (outerObjectWithEnumProperty == null) {
+ throw new WebClientResponseException("Missing the required parameter 'outerObjectWithEnumProperty' when calling fakePropertyEnumIntegerSerialize", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
+ }
+ // create path and map variables
+ final Map