diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md
index daf59d316931..968814f9ed70 100644
--- a/docs/generators/java-camel.md
+++ b/docs/generators/java-camel.md
@@ -94,7 +94,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useBeanValidation|Use BeanValidation API annotations| |true|
|useFeignClientUrl|Whether to generate Feign client with url parameter.| |true|
|useOptional|Use Optional container for optional parameters| |false|
-|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports).| |true|
+|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports).| |false|
|useSpringController|Annotate the generated API as a Spring Controller| |false|
|useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true|
|useTags|use tags for creating interface and controller classnames| |false|
diff --git a/docs/generators/spring.md b/docs/generators/spring.md
index e6e72361eb2e..92d409acfcd7 100644
--- a/docs/generators/spring.md
+++ b/docs/generators/spring.md
@@ -87,7 +87,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useBeanValidation|Use BeanValidation API annotations| |true|
|useFeignClientUrl|Whether to generate Feign client with url parameter.| |true|
|useOptional|Use Optional container for optional parameters| |false|
-|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports).| |true|
+|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports).| |false|
|useSpringController|Annotate the generated API as a Spring Controller| |false|
|useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true|
|useTags|use tags for creating interface and controller classnames| |false|
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
index 214523838b56..0778fd527bba 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
@@ -6462,7 +6462,7 @@ public boolean convertPropertyToBoolean(String propertyKey) {
return result;
}
- public void writePropertyBack(String propertyKey, boolean value) {
+ public void writePropertyBack(String propertyKey, Object value) {
additionalProperties.put(propertyKey, value);
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java
index da6c800022c4..baab0d2c307f 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java
@@ -83,6 +83,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
public static final String TEST_OUTPUT = "testOutput";
public static final String IMPLICIT_HEADERS = "implicitHeaders";
public static final String IMPLICIT_HEADERS_REGEX = "implicitHeadersRegex";
+ public static final String JAVAX_PACKAGE = "javaxPackage";
public static final String CAMEL_CASE_DOLLAR_SIGN = "camelCaseDollarSign";
@@ -671,6 +672,8 @@ public void processOpts() {
if (additionalProperties.containsKey(TEST_OUTPUT)) {
setOutputTestFolder(additionalProperties.get(TEST_OUTPUT).toString());
}
+
+ applyJavaxPackage();
}
@Override
@@ -722,6 +725,14 @@ private void sanitizeConfig() {
}
}
+ protected void applyJavaxPackage() {
+ writePropertyBack(JAVAX_PACKAGE, "javax");
+ }
+
+ protected void applyJakartaPackage() {
+ writePropertyBack(JAVAX_PACKAGE, "jakarta");
+ }
+
@Override
public String escapeReservedWord(String name) {
if (this.reservedWordsMappings().containsKey(name)) {
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java
index cfe3cb35cc69..6e2be82a69a4 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java
@@ -575,7 +575,7 @@ public void processOpts() {
// The flag below should be set for all Java libraries, but the templates need to be ported
// one by one for each library.
supportsAdditionalPropertiesWithComposedSchema = true;
-
+ applyJakartaPackage();
} else if (NATIVE.equals(getLibrary())) {
supportingFiles.add(new SupportingFile("ApiResponse.mustache", invokerFolder, "ApiResponse.java"));
supportingFiles.add(new SupportingFile("JSON.mustache", invokerFolder, "JSON.java"));
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java
index b43a9aa1c78d..4e8fb146c0ab 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java
@@ -105,7 +105,6 @@ public class SpringCodegen extends AbstractJavaCodegen
public static final String RETURN_SUCCESS_CODE = "returnSuccessCode";
public static final String UNHANDLED_EXCEPTION_HANDLING = "unhandledException";
public static final String USE_SPRING_BOOT3 = "useSpringBoot3";
- public static final String USE_JAKARTA_EE = "useJakartaEe";
public static final String REQUEST_MAPPING_OPTION = "requestMappingMode";
public static final String USE_REQUEST_MAPPING_ON_CONTROLLER = "useRequestMappingOnController";
public static final String USE_REQUEST_MAPPING_ON_INTERFACE = "useRequestMappingOnInterface";
@@ -243,7 +242,7 @@ public SpringCodegen() {
useSwaggerUI));
cliOptions.add(CliOption.newBoolean(USE_SPRING_BOOT3,
"Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports).",
- useSwaggerUI));
+ useSpringBoot3));
supportedLibraries.put(SPRING_BOOT, "Spring-boot Server application.");
supportedLibraries.put(SPRING_CLOUD_LIBRARY,
@@ -474,9 +473,7 @@ public void processOpts() {
if (AnnotationLibrary.SWAGGER1.equals(getAnnotationLibrary())) {
throw new IllegalArgumentException(AnnotationLibrary.SWAGGER1.getPropertyName() + " is not supported with Spring Boot > 3.x");
}
- writePropertyBack(USE_JAKARTA_EE, true);
- } else {
- writePropertyBack(USE_JAKARTA_EE, false);
+ applyJakartaPackage();
}
writePropertyBack(USE_SPRING_BOOT3, isUseSpringBoot3());
diff --git a/modules/openapi-generator/src/main/resources/Java/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/ApiClient.mustache
index b2972a98009a..af8607fd1cda 100644
--- a/modules/openapi-generator/src/main/resources/Java/ApiClient.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/ApiClient.mustache
@@ -21,9 +21,9 @@ import com.sun.jersey.api.client.WebResource.Builder;
import com.sun.jersey.multipart.FormDataMultiPart;
import com.sun.jersey.multipart.file.FileDataBodyPart;
-import javax.ws.rs.core.Cookie;
-import javax.ws.rs.core.Response.Status.Family;
-import javax.ws.rs.core.MediaType;
+import {{javaxPackage}}.ws.rs.core.Cookie;
+import {{javaxPackage}}.ws.rs.core.Response.Status.Family;
+import {{javaxPackage}}.ws.rs.core.MediaType;
import java.util.Collection;
import java.util.Collections;
diff --git a/modules/openapi-generator/src/main/resources/Java/BeanValidationException.mustache b/modules/openapi-generator/src/main/resources/Java/BeanValidationException.mustache
index 3fc5b8451213..acdaef19aeca 100644
--- a/modules/openapi-generator/src/main/resources/Java/BeanValidationException.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/BeanValidationException.mustache
@@ -2,8 +2,8 @@ package {{invokerPackage}};
import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.ValidationException;
+import {{javaxPackage}}.validation.ConstraintViolation;
+import {{javaxPackage}}.validation.ValidationException;
public class BeanValidationException extends ValidationException {
/**
diff --git a/modules/openapi-generator/src/main/resources/Java/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/Java/generatedAnnotation.mustache
index 875d7b97afee..f408f3199b8e 100644
--- a/modules/openapi-generator/src/main/resources/Java/generatedAnnotation.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/generatedAnnotation.mustache
@@ -1 +1 @@
-@javax.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
+@{{javaxPackage}}.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api.mustache
index f9af1a4a9bb6..6ca6a2811761 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api.mustache
@@ -14,7 +14,7 @@ import com.google.api.client.http.HttpMethods;
import com.google.api.client.http.HttpResponse;
import com.google.api.client.json.Json;
-import javax.ws.rs.core.UriBuilder;
+import {{javaxPackage}}.ws.rs.core.UriBuilder;
import java.io.IOException;
import java.util.Collection;
import java.util.HashMap;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/AbstractOpenApiSchema.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/AbstractOpenApiSchema.mustache
index 00253cceee21..bcd83836a55c 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/AbstractOpenApiSchema.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/AbstractOpenApiSchema.mustache
@@ -6,7 +6,7 @@ import {{invokerPackage}}.ApiException;
import java.util.Objects;
import java.lang.reflect.Type;
import java.util.Map;
-import javax.ws.rs.core.GenericType;
+import {{javaxPackage}}.ws.rs.core.GenericType;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache
index 2a027220da72..5d39965c5901 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache
@@ -1,15 +1,15 @@
package {{invokerPackage}};
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.client.Entity;
-import javax.ws.rs.client.Invocation;
-import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.Form;
-import javax.ws.rs.core.GenericType;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
+import {{javaxPackage}}.ws.rs.client.Client;
+import {{javaxPackage}}.ws.rs.client.ClientBuilder;
+import {{javaxPackage}}.ws.rs.client.Entity;
+import {{javaxPackage}}.ws.rs.client.Invocation;
+import {{javaxPackage}}.ws.rs.client.WebTarget;
+import {{javaxPackage}}.ws.rs.core.Form;
+import {{javaxPackage}}.ws.rs.core.GenericType;
+import {{javaxPackage}}.ws.rs.core.MediaType;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.Response.Status;
{{#hasOAuthMethods}}
import com.github.scribejava.core.model.OAuth2AccessToken;
@@ -27,9 +27,9 @@ import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
+import {{javaxPackage}}.net.ssl.SSLContext;
+import {{javaxPackage}}.net.ssl.TrustManager;
+import {{javaxPackage}}.net.ssl.X509TrustManager;
import java.security.cert.X509Certificate;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
@@ -251,7 +251,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
/**
*
Getter for the field httpClient
.
*
- * @return a {@link javax.ws.rs.client.Client} object.
+ * @return a {@link {{javaxPackage}}.ws.rs.client.Client} object.
*/
public Client getHttpClient() {
return httpClient;
@@ -260,7 +260,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
/**
* Setter for the field httpClient
.
*
- * @param httpClient a {@link javax.ws.rs.client.Client} object.
+ * @param httpClient a {@link {{javaxPackage}}.ws.rs.client.Client} object.
* @return a {@link org.openapitools.client.ApiClient} object.
*/
public ApiClient setHttpClient(Client httpClient) {
@@ -1098,7 +1098,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
/**
* Prepare the file for download from the response.
*
- * @param response a {@link javax.ws.rs.core.Response} object.
+ * @param response a {@link {{javaxPackage}}.ws.rs.core.Response} object.
* @return a {@link java.io.File} object.
* @throws java.io.IOException if any.
*/
@@ -1387,7 +1387,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
* To completely disable certificate validation (at your own risk), you can
* override this method and invoke disableCertificateValidation(clientBuilder).
*
- * @param clientBuilder a {@link javax.ws.rs.client.ClientBuilder} object.
+ * @param clientBuilder a {@link {{javaxPackage}}.ws.rs.client.ClientBuilder} object.
*/
protected void customizeClientBuilder(ClientBuilder clientBuilder) {
// No-op extension point
@@ -1399,7 +1399,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
* Please note that trusting all certificates is extremely risky.
* This may be useful in a development environment with self-signed certificates.
*
- * @param clientBuilder a {@link javax.ws.rs.client.ClientBuilder} object.
+ * @param clientBuilder a {@link {{javaxPackage}}.ws.rs.client.ClientBuilder} object.
* @throws java.security.KeyManagementException if any.
* @throws java.security.NoSuchAlgorithmException if any.
*/
@@ -1426,7 +1426,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
/**
* Build the response headers.
*
- * @param response a {@link javax.ws.rs.core.Response} object.
+ * @param response a {@link {{javaxPackage}}.ws.rs.core.Response} object.
* @return a {@link java.util.Map} of response headers.
*/
protected Map> buildResponseHeaders(Response response) {
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/JSON.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/JSON.mustache
index 8de585519bf3..47f11153f735 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/JSON.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/JSON.mustache
@@ -19,8 +19,8 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
-import javax.ws.rs.core.GenericType;
-import javax.ws.rs.ext.ContextResolver;
+import {{javaxPackage}}.ws.rs.core.GenericType;
+import {{javaxPackage}}.ws.rs.ext.ContextResolver;
{{>generatedAnnotation}}
public class JSON implements ContextResolver {
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/anyof_model.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/anyof_model.mustache
index d5b381987c08..1d20bad1a665 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/anyof_model.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/anyof_model.mustache
@@ -1,5 +1,5 @@
-import javax.ws.rs.core.GenericType;
-import javax.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.GenericType;
+import {{javaxPackage}}.ws.rs.core.Response;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache
index 756f0c129a1d..ac16f6e0598d 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache
@@ -6,7 +6,7 @@ import {{invokerPackage}}.ApiResponse;
import {{invokerPackage}}.Configuration;
import {{invokerPackage}}.Pair;
-import javax.ws.rs.core.GenericType;
+import {{javaxPackage}}.ws.rs.core.GenericType;
{{#imports}}import {{import}};
{{/imports}}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/OAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/OAuth.mustache
index 8908aa543dd1..6617522ed1b4 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/OAuth.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/OAuth.mustache
@@ -10,7 +10,7 @@ import com.github.scribejava.core.exceptions.OAuthException;
import com.github.scribejava.core.model.OAuth2AccessToken;
import com.github.scribejava.core.oauth.OAuth20Service;
-import javax.ws.rs.core.UriBuilder;
+import {{javaxPackage}}.ws.rs.core.UriBuilder;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/model.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/model.mustache
index 914e1eb1e29a..f52b07132167 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/model.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/model.mustache
@@ -36,15 +36,15 @@ import com.fasterxml.jackson.annotation.JsonCreator;
{{/vendorExtensions.x-has-readonly-properties}}
{{/jackson}}
{{#withXml}}
-import javax.xml.bind.annotation.*;
+import {{javaxPackage}}.xml.bind.annotation.*;
{{/withXml}}
{{#parcelableModel}}
import android.os.Parcelable;
import android.os.Parcel;
{{/parcelableModel}}
{{#useBeanValidation}}
-import javax.validation.constraints.*;
-import javax.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
{{#performBeanValidation}}
import org.hibernate.validator.constraints.*;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/oneof_model.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/oneof_model.mustache
index 18bcbc5e1b56..74ad0aa82588 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/oneof_model.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/oneof_model.mustache
@@ -1,5 +1,5 @@
-import javax.ws.rs.core.GenericType;
-import javax.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.GenericType;
+import {{javaxPackage}}.ws.rs.core.Response;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pojo.mustache
index 4eb9cc2f1805..fd574fcc7f37 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pojo.mustache
@@ -206,14 +206,14 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
{{/deprecated}}
{{#required}}
{{#isNullable}}
- @javax.annotation.Nullable
+ @{{javaxPackage}}.annotation.Nullable
{{/isNullable}}
{{^isNullable}}
- @javax.annotation.Nonnull
+ @{{javaxPackage}}.annotation.Nonnull
{{/isNullable}}
{{/required}}
{{^required}}
- @javax.annotation.Nullable
+ @{{javaxPackage}}.annotation.Nullable
{{/required}}
{{#useBeanValidation}}
{{>beanValidation}}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/AbstractOpenApiSchema.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/AbstractOpenApiSchema.mustache
index afbf6a9a02c9..bcd83836a55c 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/AbstractOpenApiSchema.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/AbstractOpenApiSchema.mustache
@@ -6,7 +6,7 @@ import {{invokerPackage}}.ApiException;
import java.util.Objects;
import java.lang.reflect.Type;
import java.util.Map;
-import jakarta.ws.rs.core.GenericType;
+import {{javaxPackage}}.ws.rs.core.GenericType;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/ApiClient.mustache
index a89642a27581..769f1d96c764 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/ApiClient.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/ApiClient.mustache
@@ -1,15 +1,15 @@
package {{invokerPackage}};
-import jakarta.ws.rs.client.Client;
-import jakarta.ws.rs.client.ClientBuilder;
-import jakarta.ws.rs.client.Entity;
-import jakarta.ws.rs.client.Invocation;
-import jakarta.ws.rs.client.WebTarget;
-import jakarta.ws.rs.core.Form;
-import jakarta.ws.rs.core.GenericType;
-import jakarta.ws.rs.core.MediaType;
-import jakarta.ws.rs.core.Response;
-import jakarta.ws.rs.core.Response.Status;
+import {{javaxPackage}}.ws.rs.client.Client;
+import {{javaxPackage}}.ws.rs.client.ClientBuilder;
+import {{javaxPackage}}.ws.rs.client.Entity;
+import {{javaxPackage}}.ws.rs.client.Invocation;
+import {{javaxPackage}}.ws.rs.client.WebTarget;
+import {{javaxPackage}}.ws.rs.core.Form;
+import {{javaxPackage}}.ws.rs.core.GenericType;
+import {{javaxPackage}}.ws.rs.core.MediaType;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.Response.Status;
{{#hasOAuthMethods}}
import com.github.scribejava.core.model.OAuth2AccessToken;
@@ -251,7 +251,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
/**
* Getter for the field httpClient
.
*
- * @return a {@link jakarta.ws.rs.client.Client} object.
+ * @return a {@link {{javaxPackage}}.ws.rs.client.Client} object.
*/
public Client getHttpClient() {
return httpClient;
@@ -260,7 +260,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
/**
* Setter for the field httpClient
.
*
- * @param httpClient a {@link jakarta.ws.rs.client.Client} object.
+ * @param httpClient a {@link {{javaxPackage}}.ws.rs.client.Client} object.
* @return a {@link org.openapitools.client.ApiClient} object.
*/
public ApiClient setHttpClient(Client httpClient) {
@@ -1098,7 +1098,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
/**
* Prepare the file for download from the response.
*
- * @param response a {@link jakarta.ws.rs.core.Response} object.
+ * @param response a {@link {{javaxPackage}}.ws.rs.core.Response} object.
* @return a {@link java.io.File} object.
* @throws java.io.IOException if any.
*/
@@ -1382,7 +1382,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
* To completely disable certificate validation (at your own risk), you can
* override this method and invoke disableCertificateValidation(clientBuilder).
*
- * @param clientBuilder a {@link jakarta.ws.rs.client.ClientBuilder} object.
+ * @param clientBuilder a {@link {{javaxPackage}}.ws.rs.client.ClientBuilder} object.
*/
protected void customizeClientBuilder(ClientBuilder clientBuilder) {
// No-op extension point
@@ -1394,7 +1394,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
* Please note that trusting all certificates is extremely risky.
* This may be useful in a development environment with self-signed certificates.
*
- * @param clientBuilder a {@link jakarta.ws.rs.client.ClientBuilder} object.
+ * @param clientBuilder a {@link {{javaxPackage}}.ws.rs.client.ClientBuilder} object.
* @throws java.security.KeyManagementException if any.
* @throws java.security.NoSuchAlgorithmException if any.
*/
@@ -1421,7 +1421,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
/**
* Build the response headers.
*
- * @param response a {@link jakarta.ws.rs.core.Response} object.
+ * @param response a {@link {{javaxPackage}}.ws.rs.core.Response} object.
* @return a {@link java.util.Map} of response headers.
*/
protected Map> buildResponseHeaders(Response response) {
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/JSON.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/JSON.mustache
index aea0628ac378..47f11153f735 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/JSON.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/JSON.mustache
@@ -19,8 +19,8 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
-import jakarta.ws.rs.core.GenericType;
-import jakarta.ws.rs.ext.ContextResolver;
+import {{javaxPackage}}.ws.rs.core.GenericType;
+import {{javaxPackage}}.ws.rs.ext.ContextResolver;
{{>generatedAnnotation}}
public class JSON implements ContextResolver {
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/anyof_model.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/anyof_model.mustache
index 2e14233bb93f..1d20bad1a665 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/anyof_model.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/anyof_model.mustache
@@ -1,5 +1,5 @@
-import jakarta.ws.rs.core.GenericType;
-import jakarta.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.GenericType;
+import {{javaxPackage}}.ws.rs.core.Response;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api.mustache
index 4ba6a6e955fa..ac16f6e0598d 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api.mustache
@@ -6,7 +6,7 @@ import {{invokerPackage}}.ApiResponse;
import {{invokerPackage}}.Configuration;
import {{invokerPackage}}.Pair;
-import jakarta.ws.rs.core.GenericType;
+import {{javaxPackage}}.ws.rs.core.GenericType;
{{#imports}}import {{import}};
{{/imports}}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/OAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/OAuth.mustache
index 67f56597696a..6617522ed1b4 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/OAuth.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/auth/OAuth.mustache
@@ -10,7 +10,7 @@ import com.github.scribejava.core.exceptions.OAuthException;
import com.github.scribejava.core.model.OAuth2AccessToken;
import com.github.scribejava.core.oauth.OAuth20Service;
-import jakarta.ws.rs.core.UriBuilder;
+import {{javaxPackage}}.ws.rs.core.UriBuilder;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/generatedAnnotation.mustache
index e4f87495451d..f408f3199b8e 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/generatedAnnotation.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/generatedAnnotation.mustache
@@ -1 +1 @@
-@jakarta.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
+@{{javaxPackage}}.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model.mustache
index 914e1eb1e29a..f52b07132167 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model.mustache
@@ -36,15 +36,15 @@ import com.fasterxml.jackson.annotation.JsonCreator;
{{/vendorExtensions.x-has-readonly-properties}}
{{/jackson}}
{{#withXml}}
-import javax.xml.bind.annotation.*;
+import {{javaxPackage}}.xml.bind.annotation.*;
{{/withXml}}
{{#parcelableModel}}
import android.os.Parcelable;
import android.os.Parcel;
{{/parcelableModel}}
{{#useBeanValidation}}
-import javax.validation.constraints.*;
-import javax.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
{{#performBeanValidation}}
import org.hibernate.validator.constraints.*;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/oneof_model.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/oneof_model.mustache
index e592998299a4..74ad0aa82588 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/oneof_model.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/oneof_model.mustache
@@ -1,5 +1,5 @@
-import jakarta.ws.rs.core.GenericType;
-import jakarta.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.GenericType;
+import {{javaxPackage}}.ws.rs.core.Response;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/pojo.mustache
index b9527bdd5929..5b9771df6283 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/pojo.mustache
@@ -206,14 +206,14 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
{{/deprecated}}
{{#required}}
{{#isNullable}}
- @jakarta.annotation.Nullable
+ @{{javaxPackage}}.annotation.Nullable
{{/isNullable}}
{{^isNullable}}
- @jakarta.annotation.Nonnull
+ @{{javaxPackage}}.annotation.Nonnull
{{/isNullable}}
{{/required}}
{{^required}}
- @jakarta.annotation.Nullable
+ @{{javaxPackage}}.annotation.Nullable
{{/required}}
{{#useBeanValidation}}
{{>beanValidation}}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api.mustache
index 49ad40447d9d..04119bd5a658 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api.mustache
@@ -17,8 +17,8 @@ import org.apache.cxf.jaxrs.ext.multipart.*;
{{/disableMultipart}}
{{#useBeanValidation}}
-import javax.validation.constraints.*;
-import javax.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/generatedAnnotation.mustache
index baf5ff08b496..779bf9d3b99e 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/native/generatedAnnotation.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/generatedAnnotation.mustache
@@ -1 +1 @@
-@javax.annotation.processing.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
+@{{javaxPackage}}.annotation.processing.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/model.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/model.mustache
index 6f2436c38a32..eb10614549fd 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/native/model.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/model.mustache
@@ -36,15 +36,15 @@ import com.fasterxml.jackson.annotation.JsonCreator;
{{/vendorExtensions.x-has-readonly-properties}}
{{/jackson}}
{{#withXml}}
-import javax.xml.bind.annotation.*;
+import {{javaxPackage}}.xml.bind.annotation.*;
{{/withXml}}
{{#parcelableModel}}
import android.os.Parcelable;
import android.os.Parcel;
{{/parcelableModel}}
{{#useBeanValidation}}
-import javax.validation.constraints.*;
-import javax.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
{{#performBeanValidation}}
import org.hibernate.validator.constraints.*;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/pojo.mustache
index 8243f68c8b5f..79b20ab3c8fa 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/native/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/pojo.mustache
@@ -206,14 +206,14 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
{{/deprecated}}
{{#required}}
{{#isNullable}}
- @javax.annotation.Nullable
+ @{{javaxPackage}}.annotation.Nullable
{{/isNullable}}
{{^isNullable}}
- @javax.annotation.Nonnull
+ @{{javaxPackage}}.annotation.Nonnull
{{/isNullable}}
{{/required}}
{{^required}}
- @javax.annotation.Nullable
+ @{{javaxPackage}}.annotation.Nullable
{{/required}}
{{#useBeanValidation}}
{{>beanValidation}}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/AbstractOpenApiSchema.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/AbstractOpenApiSchema.mustache
index 3ba02e44c0e3..46b0fa29bda6 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/AbstractOpenApiSchema.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/AbstractOpenApiSchema.mustache
@@ -6,7 +6,7 @@ import {{invokerPackage}}.ApiException;
import java.util.Objects;
import java.lang.reflect.Type;
import java.util.Map;
-import javax.ws.rs.core.GenericType;
+import {{javaxPackage}}.ws.rs.core.GenericType;
//import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/anyof_model.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/anyof_model.mustache
index bdaddadae823..f8b6e7dec80b 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/anyof_model.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/anyof_model.mustache
@@ -1,4 +1,4 @@
-import javax.ws.rs.core.GenericType;
+import {{javaxPackage}}.ws.rs.core.GenericType;
import java.io.IOException;
import java.lang.reflect.Type;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache
index d39478decb6f..93b7e29fda63 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache
@@ -26,13 +26,13 @@ import io.swagger.v3.oas.models.parameters.Parameter;
import java.io.IOException;
{{#useBeanValidation}}
-import javax.validation.constraints.*;
+import {{javaxPackage}}.validation.constraints.*;
{{/useBeanValidation}}
{{#performBeanValidation}}
-import javax.validation.ConstraintViolation;
-import javax.validation.Validation;
-import javax.validation.ValidatorFactory;
-import javax.validation.executable.ExecutableValidator;
+import {{javaxPackage}}.validation.ConstraintViolation;
+import {{javaxPackage}}.validation.Validation;
+import {{javaxPackage}}.validation.ValidatorFactory;
+import {{javaxPackage}}.validation.executable.ExecutableValidator;
import java.util.Set;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
@@ -51,7 +51,7 @@ import java.util.Map;
import java.io.InputStream;
{{/supportStreaming}}
{{/fullJavaUtil}}
-import javax.ws.rs.core.GenericType;
+import {{javaxPackage}}.ws.rs.core.GenericType;
{{#operations}}
public class {{classname}} {
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/apiException.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/apiException.mustache
index dd224d582299..d9ffc20bc441 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/apiException.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/apiException.mustache
@@ -9,7 +9,7 @@ import java.util.Map.Entry;
import java.util.TreeMap;
{{/caseInsensitiveResponseHeaders}}
-import javax.ws.rs.core.GenericType;
+import {{javaxPackage}}.ws.rs.core.GenericType;
/**
* ApiException class.
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/model.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/model.mustache
index b6b0381a5cee..0cf7ef988cc4 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/model.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/model.mustache
@@ -25,21 +25,21 @@ import com.fasterxml.jackson.annotation.JsonCreator;
{{/vendorExtensions.x-has-readonly-properties}}
{{/jackson}}
{{#withXml}}
-import javax.xml.bind.annotation.*;
+import {{javaxPackage}}.xml.bind.annotation.*;
{{/withXml}}
{{#jsonb}}
import java.lang.reflect.Type;
-import javax.json.bind.annotation.JsonbTypeDeserializer;
-import javax.json.bind.annotation.JsonbTypeSerializer;
-import javax.json.bind.serializer.DeserializationContext;
-import javax.json.bind.serializer.JsonbDeserializer;
-import javax.json.bind.serializer.JsonbSerializer;
-import javax.json.bind.serializer.SerializationContext;
-import javax.json.stream.JsonGenerator;
-import javax.json.stream.JsonParser;
-import javax.json.bind.annotation.JsonbProperty;
+import {{javaxPackage}}.json.bind.annotation.JsonbTypeDeserializer;
+import {{javaxPackage}}.json.bind.annotation.JsonbTypeSerializer;
+import {{javaxPackage}}.json.bind.serializer.DeserializationContext;
+import {{javaxPackage}}.json.bind.serializer.JsonbDeserializer;
+import {{javaxPackage}}.json.bind.serializer.JsonbSerializer;
+import {{javaxPackage}}.json.bind.serializer.SerializationContext;
+import {{javaxPackage}}.json.stream.JsonGenerator;
+import {{javaxPackage}}.json.stream.JsonParser;
+import {{javaxPackage}}.json.bind.annotation.JsonbProperty;
{{#vendorExtensions.x-has-readonly-properties}}
-import javax.json.bind.annotation.JsonbCreator;
+import {{javaxPackage}}.json.bind.annotation.JsonbCreator;
{{/vendorExtensions.x-has-readonly-properties}}
{{/jsonb}}
{{#parcelableModel}}
@@ -47,8 +47,8 @@ import android.os.Parcelable;
import android.os.Parcel;
{{/parcelableModel}}
{{#useBeanValidation}}
-import javax.validation.constraints.*;
-import javax.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
{{#performBeanValidation}}
import org.hibernate.validator.constraints.*;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/oneof_model.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/oneof_model.mustache
index 9b94b365f4c3..9b05d0f162ce 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/oneof_model.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/oneof_model.mustache
@@ -1,4 +1,4 @@
-import javax.ws.rs.core.GenericType;
+import {{javaxPackage}}.ws.rs.core.GenericType;
import java.io.IOException;
import java.lang.reflect.Type;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pojo.mustache
index e41ffd9d7339..c8c69eaf5b04 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pojo.mustache
@@ -223,14 +223,14 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
{{/deprecated}}
{{#required}}
{{#isNullable}}
- @javax.annotation.Nullable
+ @{{javaxPackage}}.annotation.Nullable
{{/isNullable}}
{{^isNullable}}
- @javax.annotation.Nonnull
+ @{{javaxPackage}}.annotation.Nonnull
{{/isNullable}}
{{/required}}
{{^required}}
- @javax.annotation.Nullable
+ @{{javaxPackage}}.annotation.Nullable
{{/required}}
{{#jsonb}}
@JsonbProperty("{{baseName}}")
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/ApiClient.mustache
index fe7575723d36..cd86dd44ccf9 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/ApiClient.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/ApiClient.mustache
@@ -27,16 +27,16 @@ import java.util.regex.Pattern;
import java.time.OffsetDateTime;
{{/jsr310}}
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.client.Entity;
-import javax.ws.rs.client.Invocation;
-import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.Form;
-import javax.ws.rs.core.GenericType;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
+import {{javaxPackage}}.ws.rs.client.Client;
+import {{javaxPackage}}.ws.rs.client.ClientBuilder;
+import {{javaxPackage}}.ws.rs.client.Entity;
+import {{javaxPackage}}.ws.rs.client.Invocation;
+import {{javaxPackage}}.ws.rs.client.WebTarget;
+import {{javaxPackage}}.ws.rs.core.Form;
+import {{javaxPackage}}.ws.rs.core.GenericType;
+import {{javaxPackage}}.ws.rs.core.MediaType;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.Response.Status;
import org.jboss.logging.Logger;
import org.jboss.resteasy.client.jaxrs.internal.ClientConfiguration;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/JSON.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/JSON.mustache
index 71bd624f7ed9..903a004e787f 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/JSON.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/JSON.mustache
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.datatype.jsr310.*;
import java.text.DateFormat;
-import javax.ws.rs.ext.ContextResolver;
+import {{javaxPackage}}.ws.rs.ext.ContextResolver;
{{>generatedAnnotation}}
public class JSON implements ContextResolver {
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache
index 9194b7541a16..74094c551fa3 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache
@@ -5,7 +5,7 @@ import {{invokerPackage}}.ApiClient;
import {{invokerPackage}}.Configuration;
import {{invokerPackage}}.Pair;
-import javax.ws.rs.core.GenericType;
+import {{javaxPackage}}.ws.rs.core.GenericType;
{{#imports}}import {{import}};
{{/imports}}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache
index c9950a00c6ae..964ef635fd6d 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache
@@ -62,7 +62,7 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.TimeZone;
-import javax.annotation.Nullable;
+import {{javaxPackage}}.annotation.Nullable;
{{#jsr310}}
import java.time.OffsetDateTime;
diff --git a/modules/openapi-generator/src/main/resources/Java/model.mustache b/modules/openapi-generator/src/main/resources/Java/model.mustache
index df2051798c65..63b6872d1fa8 100644
--- a/modules/openapi-generator/src/main/resources/Java/model.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/model.mustache
@@ -25,23 +25,23 @@ import com.fasterxml.jackson.annotation.JsonCreator;
{{/vendorExtensions.x-has-readonly-properties}}
{{/jackson}}
{{#withXml}}
-import javax.xml.bind.annotation.*;
-import javax.xml.bind.annotation.adapters.*;
+import {{javaxPackage}}.xml.bind.annotation.*;
+import {{javaxPackage}}.xml.bind.annotation.adapters.*;
import io.github.threetenjaxb.core.*;
{{/withXml}}
{{#jsonb}}
import java.lang.reflect.Type;
-import javax.json.bind.annotation.JsonbTypeDeserializer;
-import javax.json.bind.annotation.JsonbTypeSerializer;
-import javax.json.bind.serializer.DeserializationContext;
-import javax.json.bind.serializer.JsonbDeserializer;
-import javax.json.bind.serializer.JsonbSerializer;
-import javax.json.bind.serializer.SerializationContext;
-import javax.json.stream.JsonGenerator;
-import javax.json.stream.JsonParser;
-import javax.json.bind.annotation.JsonbProperty;
+import {{javaxPackage}}.json.bind.annotation.JsonbTypeDeserializer;
+import {{javaxPackage}}.json.bind.annotation.JsonbTypeSerializer;
+import {{javaxPackage}}.json.bind.serializer.DeserializationContext;
+import {{javaxPackage}}.json.bind.serializer.JsonbDeserializer;
+import {{javaxPackage}}.json.bind.serializer.JsonbSerializer;
+import {{javaxPackage}}.json.bind.serializer.SerializationContext;
+import {{javaxPackage}}.json.stream.JsonGenerator;
+import {{javaxPackage}}.json.stream.JsonParser;
+import {{javaxPackage}}.json.bind.annotation.JsonbProperty;
{{#vendorExtensions.x-has-readonly-properties}}
-import javax.json.bind.annotation.JsonbCreator;
+import {{javaxPackage}}.json.bind.annotation.JsonbCreator;
{{/vendorExtensions.x-has-readonly-properties}}
{{/jsonb}}
{{#parcelableModel}}
@@ -49,8 +49,8 @@ import android.os.Parcelable;
import android.os.Parcel;
{{/parcelableModel}}
{{#useBeanValidation}}
-import javax.validation.constraints.*;
-import javax.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
{{#performBeanValidation}}
import org.hibernate.validator.constraints.*;
diff --git a/modules/openapi-generator/src/main/resources/Java/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/pojo.mustache
index 6e58b9616522..ec49fd5fc832 100644
--- a/modules/openapi-generator/src/main/resources/Java/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/pojo.mustache
@@ -204,14 +204,14 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
{{/deprecated}}
{{#required}}
{{#isNullable}}
- @javax.annotation.Nullable
+ @{{javaxPackage}}.annotation.Nullable
{{/isNullable}}
{{^isNullable}}
- @javax.annotation.Nonnull
+ @{{javaxPackage}}.annotation.Nonnull
{{/isNullable}}
{{/required}}
{{^required}}
- @javax.annotation.Nullable
+ @{{javaxPackage}}.annotation.Nullable
{{/required}}
{{#jsonb}}
@JsonbProperty("{{baseName}}")
diff --git a/modules/openapi-generator/src/main/resources/JavaInflector/api.mustache b/modules/openapi-generator/src/main/resources/JavaInflector/api.mustache
index f980a89d754a..b08c1f51f20f 100644
--- a/modules/openapi-generator/src/main/resources/JavaInflector/api.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaInflector/api.mustache
@@ -2,7 +2,7 @@ package {{invokerPackage}};
import io.swagger.inflector.models.RequestContext;
import io.swagger.inflector.models.ResponseContext;
-import javax.ws.rs.core.Response.Status;
+import {{javaxPackage}}.ws.rs.core.Response.Status;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import java.io.File;
diff --git a/modules/openapi-generator/src/main/resources/JavaInflector/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaInflector/generatedAnnotation.mustache
index 875d7b97afee..f408f3199b8e 100644
--- a/modules/openapi-generator/src/main/resources/JavaInflector/generatedAnnotation.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaInflector/generatedAnnotation.mustache
@@ -1 +1 @@
-@javax.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
+@{{javaxPackage}}.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/ApiOriginFilter.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/ApiOriginFilter.mustache
index b8af270a05a2..05a79d8076bd 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/ApiOriginFilter.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/ApiOriginFilter.mustache
@@ -2,11 +2,11 @@ package {{apiPackage}};
import java.io.IOException;
-import javax.servlet.*;
-import javax.servlet.http.HttpServletResponse;
+import {{javaxPackage}}.servlet.*;
+import {{javaxPackage}}.servlet.http.HttpServletResponse;
{{>generatedAnnotation}}
-public class ApiOriginFilter implements javax.servlet.Filter {
+public class ApiOriginFilter implements {{javaxPackage}}.servlet.Filter {
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
HttpServletResponse res = (HttpServletResponse) response;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/ApiResponseMessage.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/ApiResponseMessage.mustache
index 0ddc732aae10..d3457b9dd3b1 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/ApiResponseMessage.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/ApiResponseMessage.mustache
@@ -1,11 +1,11 @@
package {{apiPackage}};
{{#withXml}}
-import javax.xml.bind.annotation.XmlTransient;
+import {{javaxPackage}}.xml.bind.annotation.XmlTransient;
{{/withXml}}
{{#withXml}}
-@javax.xml.bind.annotation.XmlRootElement
+@{{javaxPackage}}.xml.bind.annotation.XmlRootElement
{{/withXml}}
{{>generatedAnnotation}}
public class ApiResponseMessage {
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/JodaDateTimeProvider.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/JodaDateTimeProvider.mustache
index f94217909835..32a313d0d669 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/JodaDateTimeProvider.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/JodaDateTimeProvider.mustache
@@ -4,13 +4,13 @@ import com.sun.jersey.core.spi.component.ComponentContext;
import com.sun.jersey.spi.inject.Injectable;
import com.sun.jersey.spi.inject.PerRequestTypeInjectableProvider;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.core.UriInfo;
-import javax.ws.rs.ext.Provider;
+import {{javaxPackage}}.ws.rs.QueryParam;
+import {{javaxPackage}}.ws.rs.WebApplicationException;
+import {{javaxPackage}}.ws.rs.core.Context;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.Response.Status;
+import {{javaxPackage}}.ws.rs.core.UriInfo;
+import {{javaxPackage}}.ws.rs.ext.Provider;
import org.joda.time.DateTime;
import java.util.List;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/JodaLocalDateProvider.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/JodaLocalDateProvider.mustache
index 7bd4027e63dc..0c716032f871 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/JodaLocalDateProvider.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/JodaLocalDateProvider.mustache
@@ -4,13 +4,13 @@ import com.sun.jersey.core.spi.component.ComponentContext;
import com.sun.jersey.spi.inject.Injectable;
import com.sun.jersey.spi.inject.PerRequestTypeInjectableProvider;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.core.UriInfo;
-import javax.ws.rs.ext.Provider;
+import {{javaxPackage}}.ws.rs.QueryParam;
+import {{javaxPackage}}.ws.rs.WebApplicationException;
+import {{javaxPackage}}.ws.rs.core.Context;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.Response.Status;
+import {{javaxPackage}}.ws.rs.core.UriInfo;
+import {{javaxPackage}}.ws.rs.ext.Provider;
import org.joda.time.LocalDate;
import java.util.List;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/api.mustache
index c66a97028878..5d5c9ee90f18 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/api.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/api.mustache
@@ -21,14 +21,14 @@ import java.io.InputStream;
import org.glassfish.jersey.media.multipart.FormDataParam;
import org.glassfish.jersey.media.multipart.FormDataBodyPart;
-import javax.servlet.ServletConfig;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
-import javax.ws.rs.*;
+import {{javaxPackage}}.servlet.ServletConfig;
+import {{javaxPackage}}.ws.rs.core.Context;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.SecurityContext;
+import {{javaxPackage}}.ws.rs.*;
{{#useBeanValidation}}
-import javax.validation.constraints.*;
-import javax.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
@Path("{{commonPath}}")
@@ -62,7 +62,7 @@ public class {{classname}} {
}
{{#operation}}
- @javax.ws.rs.{{httpMethod}}
+ @{{javaxPackage}}.ws.rs.{{httpMethod}}
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}}
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/apiService.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/apiService.mustache
index 0aa3241c26df..64d61f6d465b 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/apiService.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/apiService.mustache
@@ -15,10 +15,10 @@ import {{package}}.NotFoundException;
import java.io.InputStream;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.SecurityContext;
{{#useBeanValidation}}
-import javax.validation.constraints.*;
+import {{javaxPackage}}.validation.constraints.*;
{{/useBeanValidation}}
{{>generatedAnnotation}}
{{#operations}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/apiServiceImpl.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/apiServiceImpl.mustache
index ab4aff259917..1c452eb8d32d 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/apiServiceImpl.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/apiServiceImpl.mustache
@@ -14,10 +14,10 @@ import java.io.InputStream;
import org.glassfish.jersey.media.multipart.FormDataBodyPart;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.SecurityContext;
{{#useBeanValidation}}
-import javax.validation.constraints.*;
+import {{javaxPackage}}.validation.constraints.*;
{{/useBeanValidation}}
{{>generatedAnnotation}}
{{#operations}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/bootstrap.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/bootstrap.mustache
index f7e8efff419f..32fd6a1f5e05 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/bootstrap.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/bootstrap.mustache
@@ -5,10 +5,10 @@ import io.swagger.models.*;
import io.swagger.models.auth.*;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
+import {{javaxPackage}}.servlet.http.HttpServlet;
+import {{javaxPackage}}.servlet.ServletContext;
+import {{javaxPackage}}.servlet.ServletConfig;
+import {{javaxPackage}}.servlet.ServletException;
public class Bootstrap extends HttpServlet {
@Override
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/RestApplication.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/RestApplication.mustache
index a7673c8f138c..a73b760bb35e 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/RestApplication.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/RestApplication.mustache
@@ -1,7 +1,7 @@
package {{invokerPackage}};
-import javax.ws.rs.ApplicationPath;
-import javax.ws.rs.core.Application;
+import {{javaxPackage}}.ws.rs.ApplicationPath;
+import {{javaxPackage}}.ws.rs.core.Application;
@ApplicationPath("{{{contextPath}}}")
public class RestApplication extends Application {
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/api.mustache
index fec0a5d7b25c..b9d34d678d61 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/api.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/api.mustache
@@ -4,12 +4,12 @@ package {{package}};
{{/imports}}
import {{package}}.{{classname}}Service;
-import javax.ws.rs.*;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
-import javax.enterprise.context.RequestScoped;
-import javax.inject.Inject;
+import {{javaxPackage}}.ws.rs.*;
+import {{javaxPackage}}.ws.rs.core.Context;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.SecurityContext;
+import {{javaxPackage}}.enterprise.context.RequestScoped;
+import {{javaxPackage}}.inject.Inject;
import io.swagger.annotations.*;
import java.io.InputStream;
@@ -21,7 +21,7 @@ import org.apache.cxf.jaxrs.ext.multipart.Multipart;
import java.util.Map;
import java.util.List;
{{#useBeanValidation}}
-import javax.validation.constraints.*;
+import {{javaxPackage}}.validation.constraints.*;
{{/useBeanValidation}}
@Path("{{commonPath}}")
@RequestScoped
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/apiService.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/apiService.mustache
index 17fd0813dd32..16b7bfacbab2 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/apiService.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/apiService.mustache
@@ -13,8 +13,8 @@ import java.util.List;
import java.io.InputStream;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.SecurityContext;
{{>generatedAnnotation}}
{{#operations}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/apiServiceImpl.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/apiServiceImpl.mustache
index bce7fe5e9307..d096e5e8fc73 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/apiServiceImpl.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/apiServiceImpl.mustache
@@ -12,9 +12,9 @@ import java.util.List;
import java.io.InputStream;
-import javax.enterprise.context.RequestScoped;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
+import {{javaxPackage}}.enterprise.context.RequestScoped;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.SecurityContext;
@RequestScoped
{{>generatedAnnotation}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/enumOuterClass.mustache
index bda8de1634b8..483e271125e2 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/enumOuterClass.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/enumOuterClass.mustache
@@ -1,7 +1,7 @@
{{#withXml}}
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlEnumValue;
+import {{javaxPackage}}.xml.bind.annotation.XmlType;
+import {{javaxPackage}}.xml.bind.annotation.XmlEnum;
+import {{javaxPackage}}.xml.bind.annotation.XmlEnumValue;
{{/withXml}}
{{>enumClass}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/generatedAnnotation.mustache
index 875d7b97afee..f408f3199b8e 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/generatedAnnotation.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/generatedAnnotation.mustache
@@ -1 +1 @@
-@javax.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
+@{{javaxPackage}}.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/model.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/model.mustache
index 96d4ac3277c8..711b94486d7a 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/model.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/model.mustache
@@ -6,7 +6,7 @@ package {{package}};
import java.io.Serializable;
{{/serializableModel}}
{{#useBeanValidation}}
-import javax.validation.constraints.*;
+import {{javaxPackage}}.validation.constraints.*;
{{/useBeanValidation}}
{{#models}}
{{#model}}{{#description}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pojo.mustache
index ceb113ef3108..6431e7e7d836 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pojo.mustache
@@ -2,7 +2,7 @@ import io.swagger.annotations.*;
import java.util.Objects;
{{#withXml}}
-import javax.xml.bind.annotation.*;
+import {{javaxPackage}}.xml.bind.annotation.*;
{{/withXml}}
{{#description}}@ApiModel(description = "{{{.}}}"){{/description}}{{>additionalModelTypeAnnotations}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/CXF2InterfaceComparator.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/CXF2InterfaceComparator.mustache
index c8340c5e9204..cbc682095dec 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/CXF2InterfaceComparator.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/CXF2InterfaceComparator.mustache
@@ -5,8 +5,8 @@ import java.lang.reflect.Method;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import javax.ws.rs.HttpMethod;
-import javax.ws.rs.Path;
+import {{javaxPackage}}.ws.rs.HttpMethod;
+import {{javaxPackage}}.ws.rs.Path;
import org.apache.cxf.jaxrs.ext.ResourceComparator;
import org.apache.cxf.jaxrs.model.ClassResourceInfo;
@@ -60,7 +60,7 @@ public class CXFInterfaceComparator implements ResourceComparator {
Method[] methods = cri.getServiceClass().getInterfaces()[0].getMethods();
// Java reflexion. Check all the methods of an interface.
for (Method method : methods) {
- Path pathAnnotation = method.getAnnotation(javax.ws.rs.Path.class);
+ Path pathAnnotation = method.getAnnotation({{javaxPackage}}.ws.rs.Path.class);
if (pathAnnotation != null && pathAnnotation.value() != null) {
String pathValue = pathAnnotation.value();
String methodHttpVerb = getMethodHttpVerb(method);
@@ -79,17 +79,17 @@ public class CXFInterfaceComparator implements ResourceComparator {
}
private static String getMethodHttpVerb(Method method) {
- if (method.getAnnotation(javax.ws.rs.POST.class) != null) {
+ if (method.getAnnotation({{javaxPackage}}.ws.rs.POST.class) != null) {
return HttpMethod.POST;
- } else if (method.getAnnotation(javax.ws.rs.GET.class) != null) {
+ } else if (method.getAnnotation({{javaxPackage}}.ws.rs.GET.class) != null) {
return HttpMethod.GET;
- } else if (method.getAnnotation(javax.ws.rs.PUT.class) != null) {
+ } else if (method.getAnnotation({{javaxPackage}}.ws.rs.PUT.class) != null) {
return HttpMethod.PUT;
- } else if (method.getAnnotation(javax.ws.rs.OPTIONS.class) != null) {
+ } else if (method.getAnnotation({{javaxPackage}}.ws.rs.OPTIONS.class) != null) {
return HttpMethod.OPTIONS;
- } else if (method.getAnnotation(javax.ws.rs.DELETE.class) != null) {
+ } else if (method.getAnnotation({{javaxPackage}}.ws.rs.DELETE.class) != null) {
return HttpMethod.DELETE;
- } else if (method.getAnnotation(javax.ws.rs.HEAD.class) != null) {
+ } else if (method.getAnnotation({{javaxPackage}}.ws.rs.HEAD.class) != null) {
return HttpMethod.HEAD;
}
assert false;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api.mustache
index 3c663fdf3bff..f9f93567ab7a 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api.mustache
@@ -7,9 +7,9 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
import java.util.Map;
-import javax.ws.rs.*;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.MediaType;
+import {{javaxPackage}}.ws.rs.*;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.MediaType;
import org.apache.cxf.jaxrs.ext.multipart.*;
import io.swagger.annotations.Api;
@@ -18,8 +18,8 @@ import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.ApiResponse;
import io.swagger.jaxrs.PATCH;
{{#useBeanValidation}}
-import javax.validation.constraints.*;
-import javax.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
{{#appName}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/apiServiceImpl.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/apiServiceImpl.mustache
index d93ffe8166b7..2be59d3e736b 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/apiServiceImpl.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/apiServiceImpl.mustache
@@ -17,8 +17,8 @@ import org.openapitools.codegen.utils.JsonCache;
import org.openapitools.codegen.utils.JsonCache.CacheException;
{{/loadTestDataFromFile}}
{{/generateOperationBody}}
-import javax.ws.rs.*;
-import javax.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.*;
+import {{javaxPackage}}.ws.rs.core.Response;
import org.apache.cxf.jaxrs.model.wadl.Description;
import org.apache.cxf.jaxrs.model.wadl.DocTarget;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api_test.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api_test.mustache
index 7df1a6c2ee57..da7dff4a07ec 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api_test.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api_test.mustache
@@ -8,8 +8,8 @@ import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.MediaType;
+import {{javaxPackage}}.ws.rs.core.Response;
import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
import org.apache.cxf.jaxrs.client.ClientConfiguration;
import org.apache.cxf.jaxrs.client.WebClient;
@@ -47,10 +47,10 @@ import java.io.File;
{{^fullJavaUtil}}
import java.util.Set;
{{/fullJavaUtil}}
-import javax.validation.ConstraintViolation;
-import javax.validation.Validation;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
+import {{javaxPackage}}.validation.ConstraintViolation;
+import {{javaxPackage}}.validation.Validation;
+import {{javaxPackage}}.validation.Validator;
+import {{javaxPackage}}.validation.ValidatorFactory;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.fasterxml.jackson.databind.node.ObjectNode;
import org.junit.BeforeClass;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/generatedAnnotation.mustache
index 875d7b97afee..f408f3199b8e 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/generatedAnnotation.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/generatedAnnotation.mustache
@@ -1 +1 @@
-@javax.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
+@{{javaxPackage}}.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/model.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/model.mustache
index ee1912f51ff0..01e2f2e68ca6 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/model.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/model.mustache
@@ -6,8 +6,8 @@ package {{package}};
import java.io.Serializable;
{{/serializableModel}}
{{#useBeanValidation}}
-import javax.validation.constraints.*;
-import javax.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
{{#models}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pojo.mustache
index b08bbd6776f2..39cae406476a 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pojo.mustache
@@ -1,12 +1,12 @@
import io.swagger.annotations.ApiModelProperty;
{{#withXml}}
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlEnumValue;
+import {{javaxPackage}}.xml.bind.annotation.XmlElement;
+import {{javaxPackage}}.xml.bind.annotation.XmlRootElement;
+import {{javaxPackage}}.xml.bind.annotation.XmlAccessType;
+import {{javaxPackage}}.xml.bind.annotation.XmlAccessorType;
+import {{javaxPackage}}.xml.bind.annotation.XmlType;
+import {{javaxPackage}}.xml.bind.annotation.XmlEnum;
+import {{javaxPackage}}.xml.bind.annotation.XmlEnumValue;
{{/withXml}}
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/CXF2InterfaceComparator.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/CXF2InterfaceComparator.mustache
index c8340c5e9204..cbc682095dec 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/CXF2InterfaceComparator.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/CXF2InterfaceComparator.mustache
@@ -5,8 +5,8 @@ import java.lang.reflect.Method;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import javax.ws.rs.HttpMethod;
-import javax.ws.rs.Path;
+import {{javaxPackage}}.ws.rs.HttpMethod;
+import {{javaxPackage}}.ws.rs.Path;
import org.apache.cxf.jaxrs.ext.ResourceComparator;
import org.apache.cxf.jaxrs.model.ClassResourceInfo;
@@ -60,7 +60,7 @@ public class CXFInterfaceComparator implements ResourceComparator {
Method[] methods = cri.getServiceClass().getInterfaces()[0].getMethods();
// Java reflexion. Check all the methods of an interface.
for (Method method : methods) {
- Path pathAnnotation = method.getAnnotation(javax.ws.rs.Path.class);
+ Path pathAnnotation = method.getAnnotation({{javaxPackage}}.ws.rs.Path.class);
if (pathAnnotation != null && pathAnnotation.value() != null) {
String pathValue = pathAnnotation.value();
String methodHttpVerb = getMethodHttpVerb(method);
@@ -79,17 +79,17 @@ public class CXFInterfaceComparator implements ResourceComparator {
}
private static String getMethodHttpVerb(Method method) {
- if (method.getAnnotation(javax.ws.rs.POST.class) != null) {
+ if (method.getAnnotation({{javaxPackage}}.ws.rs.POST.class) != null) {
return HttpMethod.POST;
- } else if (method.getAnnotation(javax.ws.rs.GET.class) != null) {
+ } else if (method.getAnnotation({{javaxPackage}}.ws.rs.GET.class) != null) {
return HttpMethod.GET;
- } else if (method.getAnnotation(javax.ws.rs.PUT.class) != null) {
+ } else if (method.getAnnotation({{javaxPackage}}.ws.rs.PUT.class) != null) {
return HttpMethod.PUT;
- } else if (method.getAnnotation(javax.ws.rs.OPTIONS.class) != null) {
+ } else if (method.getAnnotation({{javaxPackage}}.ws.rs.OPTIONS.class) != null) {
return HttpMethod.OPTIONS;
- } else if (method.getAnnotation(javax.ws.rs.DELETE.class) != null) {
+ } else if (method.getAnnotation({{javaxPackage}}.ws.rs.DELETE.class) != null) {
return HttpMethod.DELETE;
- } else if (method.getAnnotation(javax.ws.rs.HEAD.class) != null) {
+ } else if (method.getAnnotation({{javaxPackage}}.ws.rs.HEAD.class) != null) {
return HttpMethod.HEAD;
}
assert false;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api.mustache
index bb271cdb3c15..b628097f588a 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api.mustache
@@ -7,9 +7,9 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
import java.util.Map;
-import javax.ws.rs.*;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.MediaType;
+import {{javaxPackage}}.ws.rs.*;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.MediaType;
import org.apache.cxf.jaxrs.ext.multipart.*;
import io.swagger.annotations.Api;
@@ -18,8 +18,8 @@ import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.ApiResponse;
import io.swagger.jaxrs.PATCH;
{{#useBeanValidation}}
-import javax.validation.constraints.*;
-import javax.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
{{#appName}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/apiServiceImpl.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/apiServiceImpl.mustache
index bb9bc8d55fa9..84f0d426e21e 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/apiServiceImpl.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/apiServiceImpl.mustache
@@ -8,8 +8,8 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
import java.util.Map;
-import javax.ws.rs.*;
-import javax.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.*;
+import {{javaxPackage}}.ws.rs.core.Response;
import org.apache.cxf.jaxrs.model.wadl.Description;
import org.apache.cxf.jaxrs.model.wadl.DocTarget;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api_test.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api_test.mustache
index 43c1d40d7a1c..ce0d3517a1e7 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api_test.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api_test.mustache
@@ -8,7 +8,7 @@ import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;
-import javax.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.Response;
import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
import org.apache.cxf.jaxrs.client.ClientConfiguration;
import org.apache.cxf.jaxrs.client.WebClient;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/generatedAnnotation.mustache
index 875d7b97afee..f408f3199b8e 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/generatedAnnotation.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/generatedAnnotation.mustache
@@ -1 +1 @@
-@javax.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
+@{{javaxPackage}}.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/model.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/model.mustache
index ee1912f51ff0..01e2f2e68ca6 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/model.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/model.mustache
@@ -6,8 +6,8 @@ package {{package}};
import java.io.Serializable;
{{/serializableModel}}
{{#useBeanValidation}}
-import javax.validation.constraints.*;
-import javax.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
{{#models}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pojo.mustache
index 88548d49989f..90d86269f5de 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pojo.mustache
@@ -1,13 +1,13 @@
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
{{#withXml}}
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlEnumValue;
+import {{javaxPackage}}.xml.bind.annotation.XmlElement;
+import {{javaxPackage}}.xml.bind.annotation.XmlRootElement;
+import {{javaxPackage}}.xml.bind.annotation.XmlAccessType;
+import {{javaxPackage}}.xml.bind.annotation.XmlAccessorType;
+import {{javaxPackage}}.xml.bind.annotation.XmlType;
+import {{javaxPackage}}.xml.bind.annotation.XmlEnum;
+import {{javaxPackage}}.xml.bind.annotation.XmlEnumValue;
{{/withXml}}
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/generatedAnnotation.mustache
index 875d7b97afee..f408f3199b8e 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/generatedAnnotation.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/generatedAnnotation.mustache
@@ -1 +1 @@
-@javax.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
+@{{javaxPackage}}.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/jacksonJsonProvider.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/jacksonJsonProvider.mustache
index b2f385f6ca66..b67ff7cf170c 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/jacksonJsonProvider.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/jacksonJsonProvider.mustache
@@ -8,9 +8,9 @@ import com.fasterxml.jackson.datatype.jsr310.*;
import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.ext.Provider;
+import {{javaxPackage}}.ws.rs.Produces;
+import {{javaxPackage}}.ws.rs.core.MediaType;
+import {{javaxPackage}}.ws.rs.ext.Provider;
@Provider
@Produces({MediaType.APPLICATION_JSON})
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/LocalDateProvider.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/LocalDateProvider.mustache
index 8c4cd4cbd157..a3c2679abccb 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/LocalDateProvider.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/LocalDateProvider.mustache
@@ -4,13 +4,13 @@ import com.sun.jersey.core.spi.component.ComponentContext;
import com.sun.jersey.spi.inject.Injectable;
import com.sun.jersey.spi.inject.PerRequestTypeInjectableProvider;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.core.UriInfo;
-import javax.ws.rs.ext.Provider;
+import {{javaxPackage}}.ws.rs.QueryParam;
+import {{javaxPackage}}.ws.rs.WebApplicationException;
+import {{javaxPackage}}.ws.rs.core.Context;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.Response.Status;
+import {{javaxPackage}}.ws.rs.core.UriInfo;
+import {{javaxPackage}}.ws.rs.ext.Provider;
import java.time.LocalDate;
import java.util.List;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/OffsetDateTimeProvider.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/OffsetDateTimeProvider.mustache
index 876aeb327be7..e3866677f43b 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/OffsetDateTimeProvider.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/OffsetDateTimeProvider.mustache
@@ -4,13 +4,13 @@ import com.sun.jersey.core.spi.component.ComponentContext;
import com.sun.jersey.spi.inject.Injectable;
import com.sun.jersey.spi.inject.PerRequestTypeInjectableProvider;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.core.UriInfo;
-import javax.ws.rs.ext.Provider;
+import {{javaxPackage}}.ws.rs.QueryParam;
+import {{javaxPackage}}.ws.rs.WebApplicationException;
+import {{javaxPackage}}.ws.rs.core.Context;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.Response.Status;
+import {{javaxPackage}}.ws.rs.core.UriInfo;
+import {{javaxPackage}}.ws.rs.ext.Provider;
import java.time.OffsetDateTime;
import java.util.List;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/api.mustache
index 6751fc0b0687..12bdd7986e9f 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/api.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/api.mustache
@@ -19,13 +19,13 @@ import java.io.InputStream;
import com.sun.jersey.multipart.FormDataParam;
import com.sun.jersey.multipart.FormDataBodyPart;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
-import javax.ws.rs.*;
+import {{javaxPackage}}.ws.rs.core.Context;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.SecurityContext;
+import {{javaxPackage}}.ws.rs.*;
{{#useBeanValidation}}
-import javax.validation.constraints.*;
-import javax.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
@Path("{{commonPath}}")
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiService.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiService.mustache
index 156d1201feca..65623eff6e02 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiService.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiService.mustache
@@ -16,10 +16,10 @@ import java.io.InputStream;
import com.sun.jersey.multipart.FormDataParam;
import com.sun.jersey.multipart.FormDataBodyPart;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.SecurityContext;
{{#useBeanValidation}}
-import javax.validation.constraints.*;
+import {{javaxPackage}}.validation.constraints.*;
{{/useBeanValidation}}
{{>generatedAnnotation}}
{{#operations}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiServiceImpl.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiServiceImpl.mustache
index 5578b4aaa284..f6243396d88e 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiServiceImpl.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiServiceImpl.mustache
@@ -16,10 +16,10 @@ import java.io.InputStream;
import com.sun.jersey.multipart.FormDataParam;
import com.sun.jersey.multipart.FormDataBodyPart;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.SecurityContext;
{{#useBeanValidation}}
-import javax.validation.constraints.*;
+import {{javaxPackage}}.validation.constraints.*;
{{/useBeanValidation}}
{{>generatedAnnotation}}
{{#operations}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey2/LocalDateProvider.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey2/LocalDateProvider.mustache
index 90a5fb620844..baebdfd08cbb 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey2/LocalDateProvider.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey2/LocalDateProvider.mustache
@@ -1,8 +1,8 @@
package {{apiPackage}};
-import javax.ws.rs.ext.ParamConverter;
-import javax.ws.rs.ext.ParamConverterProvider;
-import javax.ws.rs.ext.Provider;
+import {{javaxPackage}}.ws.rs.ext.ParamConverter;
+import {{javaxPackage}}.ws.rs.ext.ParamConverterProvider;
+import {{javaxPackage}}.ws.rs.ext.Provider;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.time.LocalDate;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey2/OffsetDateTimeProvider.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey2/OffsetDateTimeProvider.mustache
index fccb0deb16ce..f597e261e83a 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey2/OffsetDateTimeProvider.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey2/OffsetDateTimeProvider.mustache
@@ -1,8 +1,8 @@
package {{apiPackage}};
-import javax.ws.rs.ext.ParamConverter;
-import javax.ws.rs.ext.ParamConverterProvider;
-import javax.ws.rs.ext.Provider;
+import {{javaxPackage}}.ws.rs.ext.ParamConverter;
+import {{javaxPackage}}.ws.rs.ext.ParamConverterProvider;
+import {{javaxPackage}}.ws.rs.ext.Provider;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.time.OffsetDateTime;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/model.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/model.mustache
index 1c187edc4ec4..82c81763496d 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/model.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/model.mustache
@@ -12,8 +12,8 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.io.Serializable;
{{/serializableModel}}
{{#useBeanValidation}}
-import javax.validation.constraints.*;
-import javax.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
{{#models}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/ApiOriginFilter.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/ApiOriginFilter.mustache
index 090fd8cb5550..a964396f4c0f 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/ApiOriginFilter.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/ApiOriginFilter.mustache
@@ -2,11 +2,11 @@ package {{apiPackage}};
import java.io.IOException;
-import javax.servlet.*;
-import javax.servlet.http.HttpServletResponse;
+import {{javaxPackage}}.servlet.*;
+import {{javaxPackage}}.servlet.http.HttpServletResponse;
{{>generatedAnnotation}}
-public class ApiOriginFilter implements javax.servlet.Filter {
+public class ApiOriginFilter implements {{javaxPackage}}.servlet.Filter {
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
HttpServletResponse res = (HttpServletResponse) response;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/ApiResponseMessage.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/ApiResponseMessage.mustache
index c883e16b5e6c..446b6a1bb699 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/ApiResponseMessage.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/ApiResponseMessage.mustache
@@ -1,8 +1,8 @@
package {{apiPackage}};
-import javax.xml.bind.annotation.XmlTransient;
+import {{javaxPackage}}.xml.bind.annotation.XmlTransient;
-@javax.xml.bind.annotation.XmlRootElement
+@{{javaxPackage}}.xml.bind.annotation.XmlRootElement
{{>generatedAnnotation}}
public class ApiResponseMessage {
public static final int ERROR = 1;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/JacksonConfig.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/JacksonConfig.mustache
index ab728041c8ab..3f879ba17077 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/JacksonConfig.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/JacksonConfig.mustache
@@ -3,8 +3,8 @@ package {{invokerPackage}};
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
-import javax.ws.rs.ext.ContextResolver;
-import javax.ws.rs.ext.Provider;
+import {{javaxPackage}}.ws.rs.ext.ContextResolver;
+import {{javaxPackage}}.ws.rs.ext.Provider;
import java.io.IOException;
@Provider
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/JodaDateTimeProvider.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/JodaDateTimeProvider.mustache
index 74c24c877707..fa3215e4437e 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/JodaDateTimeProvider.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/JodaDateTimeProvider.mustache
@@ -1,13 +1,13 @@
package {{apiPackage}};
import org.joda.time.DateTime;
-import javax.ws.rs.ext.ParamConverter;
-import javax.ws.rs.ext.ParamConverterProvider;
-import javax.ws.rs.ext.Provider;
+import {{javaxPackage}}.ws.rs.ext.ParamConverter;
+import {{javaxPackage}}.ws.rs.ext.ParamConverterProvider;
+import {{javaxPackage}}.ws.rs.ext.Provider;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.WebApplicationException;
+import {{javaxPackage}}.ws.rs.core.Response;
@Provider
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/JodaLocalDateProvider.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/JodaLocalDateProvider.mustache
index 0b28c915dd99..55265b8055c0 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/JodaLocalDateProvider.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/JodaLocalDateProvider.mustache
@@ -1,13 +1,13 @@
package {{apiPackage}};
import org.joda.time.LocalDate;
-import javax.ws.rs.ext.ParamConverter;
-import javax.ws.rs.ext.ParamConverterProvider;
-import javax.ws.rs.ext.Provider;
+import {{javaxPackage}}.ws.rs.ext.ParamConverter;
+import {{javaxPackage}}.ws.rs.ext.ParamConverterProvider;
+import {{javaxPackage}}.ws.rs.ext.Provider;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.WebApplicationException;
+import {{javaxPackage}}.ws.rs.core.Response;
@Provider
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/LocalDateProvider.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/LocalDateProvider.mustache
index a57e3e747501..4d656fb55ab3 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/LocalDateProvider.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/LocalDateProvider.mustache
@@ -1,9 +1,9 @@
package {{apiPackage}};
import java.time.LocalDate;
-import javax.ws.rs.ext.ParamConverter;
-import javax.ws.rs.ext.ParamConverterProvider;
-import javax.ws.rs.ext.Provider;
+import {{javaxPackage}}.ws.rs.ext.ParamConverter;
+import {{javaxPackage}}.ws.rs.ext.ParamConverterProvider;
+import {{javaxPackage}}.ws.rs.ext.Provider;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/OffsetDateTimeProvider.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/OffsetDateTimeProvider.mustache
index a3974c3c5334..fc7cc3577487 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/OffsetDateTimeProvider.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/OffsetDateTimeProvider.mustache
@@ -1,9 +1,9 @@
package {{apiPackage}};
import java.time.OffsetDateTime;
-import javax.ws.rs.ext.ParamConverter;
-import javax.ws.rs.ext.ParamConverterProvider;
-import javax.ws.rs.ext.Provider;
+import {{javaxPackage}}.ws.rs.ext.ParamConverter;
+import {{javaxPackage}}.ws.rs.ext.ParamConverterProvider;
+import {{javaxPackage}}.ws.rs.ext.Provider;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/RestApplication.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/RestApplication.mustache
index 99f572b54ff0..bc3a150673b5 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/RestApplication.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/RestApplication.mustache
@@ -1,7 +1,7 @@
package {{invokerPackage}};
-import javax.ws.rs.ApplicationPath;
-import javax.ws.rs.core.Application;
+import {{javaxPackage}}.ws.rs.ApplicationPath;
+import {{javaxPackage}}.ws.rs.core.Application;
@ApplicationPath("{{{contextPath}}}")
public class RestApplication extends Application {
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/api.mustache
index c314c4d823c8..a7d9d61c90ec 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/api.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/api.mustache
@@ -15,15 +15,15 @@ import {{package}}.NotFoundException;
import java.io.InputStream;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
-import javax.ws.rs.*;
-import javax.inject.Inject;
+import {{javaxPackage}}.ws.rs.core.Context;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.SecurityContext;
+import {{javaxPackage}}.ws.rs.*;
+import {{javaxPackage}}.inject.Inject;
{{#useBeanValidation}}
-import javax.validation.constraints.*;
-import javax.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
{{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
{{/isMultipart}}{{/operation}}{{/operations}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/apiService.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/apiService.mustache
index 4eb59cbfc1a8..e2b60f723d42 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/apiService.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/apiService.mustache
@@ -13,8 +13,8 @@ import {{package}}.NotFoundException;
import java.io.InputStream;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.SecurityContext;
{{>generatedAnnotation}}
{{#operations}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/apiServiceImpl.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/apiServiceImpl.mustache
index 0ca584a20535..484b1cec942c 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/apiServiceImpl.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/apiServiceImpl.mustache
@@ -13,9 +13,9 @@ import {{package}}.NotFoundException;
import java.io.InputStream;
-import javax.enterprise.context.RequestScoped;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
+import {{javaxPackage}}.enterprise.context.RequestScoped;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.SecurityContext;
@RequestScoped
{{>generatedAnnotation}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/JacksonConfig.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/JacksonConfig.mustache
index 891007b9dc00..9b5ad8fa1314 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/JacksonConfig.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/JacksonConfig.mustache
@@ -1,9 +1,9 @@
package {{invokerPackage}};
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.ext.ContextResolver;
-import javax.ws.rs.ext.Provider;
+import {{javaxPackage}}.ws.rs.Produces;
+import {{javaxPackage}}.ws.rs.core.MediaType;
+import {{javaxPackage}}.ws.rs.ext.ContextResolver;
+import {{javaxPackage}}.ws.rs.ext.Provider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/RestApplication.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/RestApplication.mustache
index d68fdfd4adfb..3eac5806aae6 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/RestApplication.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/RestApplication.mustache
@@ -1,7 +1,7 @@
package {{invokerPackage}};
-import javax.ws.rs.ApplicationPath;
-import javax.ws.rs.core.Application;
+import {{javaxPackage}}.ws.rs.ApplicationPath;
+import {{javaxPackage}}.ws.rs.core.Application;
import java.util.Set;
import java.util.HashSet;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/api.mustache
index b4002a51d4e8..afd3787a2b07 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/api.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/api.mustache
@@ -13,13 +13,13 @@ import java.util.Map;
import java.io.InputStream;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
-import javax.ws.rs.*;
+import {{javaxPackage}}.ws.rs.core.Context;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.SecurityContext;
+import {{javaxPackage}}.ws.rs.*;
{{#useBeanValidation}}
-import javax.validation.constraints.*;
-import javax.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
{{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
{{/isMultipart}}{{/operation}}{{/operations}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/apiServiceImpl.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/apiServiceImpl.mustache
index 54167964d5a0..0035baccec7f 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/apiServiceImpl.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/apiServiceImpl.mustache
@@ -12,8 +12,8 @@ import java.util.List;
import java.io.InputStream;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.SecurityContext;
{{>generatedAnnotation}}
{{#operations}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/generatedAnnotation.mustache
index 875d7b97afee..f408f3199b8e 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/generatedAnnotation.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/generatedAnnotation.mustache
@@ -1 +1 @@
-@javax.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
+@{{javaxPackage}}.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/model.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/model.mustache
index 2ff294581f55..6de67ac4fb17 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/model.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/model.mustache
@@ -8,7 +8,7 @@ import java.util.ArrayList;
import java.io.Serializable;
{{/serializableModel}}
{{#useBeanValidation}}
-import javax.validation.constraints.*;
+import {{javaxPackage}}.validation.constraints.*;
{{/useBeanValidation}}
{{#models}}
{{#model}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/generatedAnnotation.mustache
index 875d7b97afee..f408f3199b8e 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/generatedAnnotation.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/generatedAnnotation.mustache
@@ -1 +1 @@
-@javax.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
+@{{javaxPackage}}.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/model.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/model.mustache
index 2ff294581f55..6de67ac4fb17 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/model.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/model.mustache
@@ -8,7 +8,7 @@ import java.util.ArrayList;
import java.io.Serializable;
{{/serializableModel}}
{{#useBeanValidation}}
-import javax.validation.constraints.*;
+import {{javaxPackage}}.validation.constraints.*;
{{/useBeanValidation}}
{{#models}}
{{#model}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/RestApplication.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/RestApplication.mustache
index 56618f1541a0..0beb062ce4fe 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/RestApplication.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/RestApplication.mustache
@@ -1,7 +1,7 @@
package {{invokerPackage}};
-import javax.ws.rs.ApplicationPath;
-import javax.ws.rs.core.Application;
+import {{javaxPackage}}.ws.rs.ApplicationPath;
+import {{javaxPackage}}.ws.rs.core.Application;
@ApplicationPath(RestResourceRoot.APPLICATION_PATH)
public class RestApplication extends Application {
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/api.mustache
index b3edb29bbf5c..d0d0dd5b5a9c 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/api.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/api.mustache
@@ -3,8 +3,8 @@ package {{package}};
{{#imports}}import {{import}};
{{/imports}}
-import javax.ws.rs.*;
-import javax.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.*;
+import {{javaxPackage}}.ws.rs.core.Response;
{{#useSwaggerAnnotations}}
import io.swagger.annotations.*;
@@ -17,8 +17,8 @@ import java.util.concurrent.CompletableFuture;
import java.io.InputStream;
import java.util.Map;
import java.util.List;
-{{#useBeanValidation}}import javax.validation.constraints.*;
-import javax.validation.Valid;{{/useBeanValidation}}
+{{#useBeanValidation}}import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;{{/useBeanValidation}}
@Path("{{commonPath}}"){{#useSwaggerAnnotations}}
@Api(description = "the {{{baseName}}} API"){{/useSwaggerAnnotations}}{{#hasConsumes}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/generatedAnnotation.mustache
index 875d7b97afee..f408f3199b8e 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/generatedAnnotation.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/generatedAnnotation.mustache
@@ -1 +1 @@
-@javax.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
+@{{javaxPackage}}.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/api.mustache
index e0fbaaed63c2..c657ee7acad6 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/api.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/api.mustache
@@ -3,8 +3,8 @@ package {{package}};
{{#imports}}import {{import}};
{{/imports}}
-import javax.ws.rs.*;
-import javax.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.*;
+import {{javaxPackage}}.ws.rs.core.Response;
{{#useGzipFeature}}
import org.jboss.resteasy.annotations.GZIP;
@@ -21,8 +21,8 @@ import java.util.concurrent.CompletableFuture;
import java.io.InputStream;
import java.util.Map;
import java.util.List;
-{{#useBeanValidation}}import javax.validation.constraints.*;
-import javax.validation.Valid;{{/useBeanValidation}}
+{{#useBeanValidation}}import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;{{/useBeanValidation}}
@Path("{{commonPath}}"){{#useSwaggerAnnotations}}
@Api(description = "the {{{baseName}}} API"){{/useSwaggerAnnotations}}{{#hasConsumes}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/model.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/model.mustache
index 7fad7858e999..7f9e087d61f0 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/model.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/model.mustache
@@ -6,8 +6,8 @@ package {{package}};
import java.io.Serializable;
{{/serializableModel}}
{{#useBeanValidation}}
-import javax.validation.constraints.*;
-import javax.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
{{#models}}
diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/apiDocController.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/apiDocController.mustache
index fd48e5e8c44e..b900863b05e9 100644
--- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/apiDocController.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/apiDocController.mustache
@@ -1,6 +1,6 @@
package {{apiPackage}};
-import javax.inject.*;
+import {{javaxPackage}}.inject.*;
import play.mvc.*;
public class ApiDocController extends Controller {
diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/errorHandler.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/errorHandler.mustache
index 4c2999bc7441..d4e3f9a8c4e5 100644
--- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/errorHandler.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/errorHandler.mustache
@@ -10,7 +10,7 @@ import play.http.DefaultHttpErrorHandler;
import play.mvc.Http.*;
import play.mvc.*;
-import javax.inject.*;
+import {{javaxPackage}}.inject.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionStage;
import static play.mvc.Results.*;
diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/generatedAnnotation.mustache
index 875d7b97afee..f408f3199b8e 100644
--- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/generatedAnnotation.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/generatedAnnotation.mustache
@@ -1 +1 @@
-@javax.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
+@{{javaxPackage}}.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/model.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/model.mustache
index 2f149aac0a13..3fe07a718f38 100644
--- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/model.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/model.mustache
@@ -7,7 +7,7 @@ import java.io.Serializable;
{{/serializableModel}}
import com.fasterxml.jackson.annotation.*;
import java.util.Set;
-import javax.validation.*;
+import {{javaxPackage}}.validation.*;
{{#models}}
{{#model}}
{{#isEnum}}
diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApi.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApi.mustache
index a35fc931e1ea..bf3cf9d4c014 100644
--- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApi.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApi.mustache
@@ -15,7 +15,7 @@ import java.util.concurrent.CompletionStage;
import java.util.concurrent.CompletableFuture;
{{/supportAsync}}
{{#useBeanValidation}}
-import javax.validation.constraints.*;
+import {{javaxPackage}}.validation.constraints.*;
{{/useBeanValidation}}
{{>generatedAnnotation}}
{{#operations}}
diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiController.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiController.mustache
index a66d7532a810..9aabde2f28da 100644
--- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiController.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiController.mustache
@@ -31,7 +31,7 @@ import java.util.concurrent.CompletableFuture;
{{/supportAsync}}
{{#useBeanValidation}}
-import javax.validation.constraints.*;
+import {{javaxPackage}}.validation.constraints.*;
import com.typesafe.config.Config;
{{/useBeanValidation}}
diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiInterface.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiInterface.mustache
index 157ba3a0bc1a..4328f6292103 100644
--- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiInterface.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiInterface.mustache
@@ -25,7 +25,7 @@ import java.util.concurrent.CompletableFuture;
{{/supportAsync}}
{{#useBeanValidation}}
-import javax.validation.constraints.*;
+import {{javaxPackage}}.validation.constraints.*;
{{/useBeanValidation}}
{{#operations}}
diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/openapiUtils.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/openapiUtils.mustache
index 508a2bb1f11b..72db2cae5293 100644
--- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/openapiUtils.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/openapiUtils.mustache
@@ -10,10 +10,10 @@ import java.text.SimpleDateFormat;
import java.util.*;
{{#useBeanValidation}}
-import javax.validation.ConstraintViolation;
-import javax.validation.Validation;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
+import {{javaxPackage}}.validation.ConstraintViolation;
+import {{javaxPackage}}.validation.Validation;
+import {{javaxPackage}}.validation.Validator;
+import {{javaxPackage}}.validation.ValidatorFactory;
{{/useBeanValidation}}
public class OpenAPIUtils {
diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache
index 366bb8baf8aa..2a4074e4c6bb 100644
--- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache
@@ -1,6 +1,6 @@
import java.util.Objects;
{{#useBeanValidation}}
-import javax.validation.constraints.*;
+import {{javaxPackage}}.validation.constraints.*;
{{/useBeanValidation}}
/**
* {{description}}{{^description}}{{classname}}{{/description}}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache
index 0ae5e6db62aa..28e73b574a0d 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache
@@ -50,14 +50,8 @@ import org.springframework.http.codec.multipart.Part;
{{/reactive}}
{{#useBeanValidation}}
-{{#useJakartaEe}}
-import jakarta.validation.Valid;
-import jakarta.validation.constraints.*;
-{{/useJakartaEe}}
-{{^useJakartaEe}}
-import javax.validation.Valid;
-import javax.validation.constraints.*;
-{{/useJakartaEe}}
+import {{javaxPackage}}.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
{{/useBeanValidation}}
import java.util.List;
import java.util.Map;
@@ -72,12 +66,7 @@ import java.util.Optional;
{{#async}}
import java.util.concurrent.CompletableFuture;
{{/async}}
-{{#useJakartaEe}}
-import jakarta.annotation.Generated;
-{{/useJakartaEe}}
-{{^useJakartaEe}}
-import javax.annotation.Generated;
-{{/useJakartaEe}}
+import {{javaxPackage}}.annotation.Generated;
{{>generatedAnnotation}}
{{#useBeanValidation}}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache
index d6be388587d3..df224372c6e2 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache
@@ -36,25 +36,14 @@ import org.springframework.web.context.request.NativeWebRequest;
{{/isDelegate}}
{{#useBeanValidation}}
-{{#useJakartaEe}}
-import jakarta.validation.Valid;
-import jakarta.validation.constraints.*;
-{{/useJakartaEe}}
-{{^useJakartaEe}}
-import javax.validation.constraints.*;
-import javax.validation.Valid;
-{{/useJakartaEe}}
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
import java.util.List;
import java.util.Map;
import java.util.Optional;
-{{#useJakartaEe}}
-import jakarta.annotation.Generated;
-{{/useJakartaEe}}
-{{^useJakartaEe}}
-import javax.annotation.Generated;
-{{/useJakartaEe}}
+import {{javaxPackage}}.annotation.Generated;
{{>generatedAnnotation}}
@Controller
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache
index 5d3332c0cc0d..b11e41a54258 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache
@@ -20,12 +20,7 @@ import java.util.Optional;
{{#async}}
import java.util.concurrent.CompletableFuture;
{{/async}}
-{{#useJakartaEe}}
-import jakarta.annotation.Generated;
-{{/useJakartaEe}}
-{{^useJakartaEe}}
-import javax.annotation.Generated;
-{{/useJakartaEe}}
+import {{javaxPackage}}.annotation.Generated;
{{#operations}}
/**
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiException.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiException.mustache
index e965bb991269..80f0818b59c3 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/apiException.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiException.mustache
@@ -1,11 +1,6 @@
package {{apiPackage}};
-{{#useJakartaEe}}
-import jakarta.annotation.Generated;
-{{/useJakartaEe}}
-{{^useJakartaEe}}
-import javax.annotation.Generated;
-{{/useJakartaEe}}
+import {{javaxPackage}}.annotation.Generated;
/**
* The exception that can be used to store the HTTP status code returned by an API response.
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiOriginFilter.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiOriginFilter.mustache
index 149e566718f9..f71bbb838d7d 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/apiOriginFilter.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiOriginFilter.mustache
@@ -2,17 +2,12 @@ package {{apiPackage}};
import java.io.IOException;
-{{#useJakartaEe}}
-import jakarta.annotation.Generated;
-import jakarta.servlet.*;
-import jakarta.servlet.http.HttpServletResponse;
-{{/useJakartaEe}}
-{{^useJakartaEe}}
-import javax.annotation.Generated;
-{{/useJakartaEe}}
+import {{javaxPackage}}.annotation.Generated;
+import {{javaxPackage}}.servlet.*;
+import {{javaxPackage}}.servlet.http.HttpServletResponse;
{{>generatedAnnotation}}
-public class ApiOriginFilter implements javax.servlet.Filter {
+public class ApiOriginFilter implements {{javaxPackage}}.servlet.Filter {
@Override
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiResponseMessage.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiResponseMessage.mustache
index 2d22a425f3a6..73d13380f51c 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/apiResponseMessage.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiResponseMessage.mustache
@@ -1,15 +1,10 @@
package {{apiPackage}};
-{{#useJakartaEe}}
-import jakarta.annotation.Generated;
-{{/useJakartaEe}}
-{{^useJakartaEe}}
-import javax.annotation.Generated;
-{{/useJakartaEe}}
-import javax.xml.bind.annotation.XmlTransient;
+import {{javaxPackage}}.annotation.Generated;
+import {{javaxPackage}}.xml.bind.annotation.XmlTransient;
{{>generatedAnnotation}}
-@javax.xml.bind.annotation.XmlRootElement
+@{{javaxPackage}}.xml.bind.annotation.XmlRootElement
public class ApiResponseMessage {
public static final int ERROR = 1;
public static final int WARNING = 2;
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiUtil.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiUtil.mustache
index d7c7819dba18..edbc003ac0ae 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/apiUtil.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiUtil.mustache
@@ -12,12 +12,7 @@ import reactor.core.publisher.Mono;
{{^reactive}}
import org.springframework.web.context.request.NativeWebRequest;
-{{#useJakartaEe}}
-import jakarta.servlet.http.HttpServletResponse;
-{{/useJakartaEe}}
-{{^useJakartaEe}}
-import javax.servlet.http.HttpServletResponse;
-{{/useJakartaEe}}
+import {{javaxPackage}}.servlet.http.HttpServletResponse;
import java.io.IOException;
{{/reactive}}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache
index 8c267ca63502..00575951f060 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache
@@ -12,22 +12,11 @@ import java.io.Serializable;
{{/serializableModel}}
import java.time.OffsetDateTime;
{{#useBeanValidation}}
-{{#useJakartaEe}}
-import jakarta.validation.Valid;
-import jakarta.validation.constraints.*;
-{{/useJakartaEe}}
-{{^useJakartaEe}}
-import javax.validation.Valid;
-import javax.validation.constraints.*;
-{{/useJakartaEe}}
+import {{javaxPackage}}.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
{{/useBeanValidation}}
{{^useBeanValidation}}
-{{#useJakartaEe}}
-import jakarta.validation.constraints.NotNull;
-{{/useJakartaEe}}
-{{^useJakartaEe}}
-import javax.validation.constraints.NotNull;
-{{/useJakartaEe}}
+import {{javaxPackage}}.validation.constraints.NotNull;
{{/useBeanValidation}}
{{#performBeanValidation}}
import org.hibernate.validator.constraints.*;
@@ -43,7 +32,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
{{/swagger2AnnotationLibrary}}
{{#withXml}}
-import javax.xml.bind.annotation.*;
+import {{javaxPackage}}.xml.bind.annotation.*;
{{/withXml}}
{{^parent}}
{{#hateoas}}
@@ -52,12 +41,7 @@ import org.springframework.hateoas.RepresentationModel;
{{/parent}}
import java.util.*;
-{{#useJakartaEe}}
-import jakarta.annotation.Generated;
-{{/useJakartaEe}}
-{{^useJakartaEe}}
-import javax.annotation.Generated;
-{{/useJakartaEe}}
+import {{javaxPackage}}.annotation.Generated;
{{#models}}
{{#model}}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/notFoundException.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/notFoundException.mustache
index 11ad8c965ff3..98f76b2710fb 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/notFoundException.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/notFoundException.mustache
@@ -1,11 +1,6 @@
package {{apiPackage}};
-{{#useJakartaEe}}
-import jakarta.annotation.Generated;
-{{/useJakartaEe}}
-{{^useJakartaEe}}
-import javax.annotation.Generated;
-{{/useJakartaEe}}
+import {{javaxPackage}}.annotation.Generated;
{{>generatedAnnotation}}
public class NotFoundException extends ApiException {
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/openapiDocumentationConfig.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/openapiDocumentationConfig.mustache
index e33af7175622..9a08ea786088 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/openapiDocumentationConfig.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/openapiDocumentationConfig.mustache
@@ -18,14 +18,8 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
{{#useOptional}}
import java.util.Optional;
{{/useOptional}}
-{{#useJakartaEe}}
-import jakarta.annotation.Generated;
-import jakarta.servlet.ServletContext;
-{{/useJakartaEe}}
-{{^useJakartaEe}}
-import javax.annotation.Generated;
-import javax.servlet.ServletContext;
-{{/useJakartaEe}}
+import {{javaxPackage}}.annotation.Generated;
+import {{javaxPackage}}.servlet.ServletContext;
{{>generatedAnnotation}}
@Configuration
diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache
index 30e4b839abc2..842fe1f3f0d6 100644
--- a/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache
+++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache
@@ -17,15 +17,15 @@ import io.micronaut.http.HttpResponse;
{{#imports}}
import {{import}};
{{/imports}}
-import javax.annotation.Generated;
+import {{javaxPackage}}.annotation.Generated;
{{^fullJavaUtil}}
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
{{/fullJavaUtil}}{{#useBeanValidation}}
-import javax.validation.Valid;
-import javax.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
{{/useBeanValidation}}
{{#generateSwagger1Annotations}}
import io.swagger.annotations.*;
diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/Authorization.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/Authorization.mustache
index e805e24db6d6..6d3f706ffb57 100644
--- a/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/Authorization.mustache
+++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/Authorization.mustache
@@ -11,7 +11,7 @@ import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import javax.annotation.Generated;
+import {{javaxPackage}}.annotation.Generated;
{{>common/generatedAnnotation}}
diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/AuthorizationBinder.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/AuthorizationBinder.mustache
index 14329a506cbb..4b26586d84b4 100644
--- a/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/AuthorizationBinder.mustache
+++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/AuthorizationBinder.mustache
@@ -13,7 +13,7 @@ import io.micronaut.http.client.bind.ClientRequestUriContext;
import jakarta.inject.Singleton;
import java.util.ArrayList;
import java.util.List;
-import javax.annotation.Generated;
+import {{javaxPackage}}.annotation.Generated;
{{>common/generatedAnnotation}}
diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/AuthorizationFilter.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/AuthorizationFilter.mustache
index 98c360786c87..4c9c72d8779a 100644
--- a/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/AuthorizationFilter.mustache
+++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/AuthorizationFilter.mustache
@@ -33,7 +33,7 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
-import javax.annotation.Generated;
+import {{javaxPackage}}.annotation.Generated;
{{>common/generatedAnnotation}}
diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/Authorizations.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/Authorizations.mustache
index 7d3fb75cdab2..5cdd5363d75c 100644
--- a/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/Authorizations.mustache
+++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/Authorizations.mustache
@@ -8,7 +8,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import javax.annotation.Generated;
+import {{javaxPackage}}.annotation.Generated;
{{>common/generatedAnnotation}}
diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/ApiKeyAuthConfiguration.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/ApiKeyAuthConfiguration.mustache
index 28d1da0655cb..529019d44108 100644
--- a/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/ApiKeyAuthConfiguration.mustache
+++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/ApiKeyAuthConfiguration.mustache
@@ -7,7 +7,7 @@ import io.micronaut.context.annotation.Parameter;
import io.micronaut.core.annotation.NonNull;
import io.micronaut.http.MutableHttpRequest;
import io.micronaut.http.cookie.Cookie;
-import javax.annotation.Generated;
+import {{javaxPackage}}.annotation.Generated;
{{>common/generatedAnnotation}}
diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/ConfigurableAuthorization.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/ConfigurableAuthorization.mustache
index ab87ecfc02cd..968f3c9f7979 100644
--- a/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/ConfigurableAuthorization.mustache
+++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/ConfigurableAuthorization.mustache
@@ -3,7 +3,7 @@ package {{invokerPackage}}.auth.configuration;
import io.micronaut.core.annotation.NonNull;
import io.micronaut.http.MutableHttpRequest;
-import javax.annotation.Generated;
+import {{javaxPackage}}.annotation.Generated;
{{>common/generatedAnnotation}}
diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/HttpBasicAuthConfiguration.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/HttpBasicAuthConfiguration.mustache
index 6431c2846d6a..fae0b3f99515 100644
--- a/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/HttpBasicAuthConfiguration.mustache
+++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/auth/configuration/HttpBasicAuthConfiguration.mustache
@@ -6,7 +6,7 @@ import io.micronaut.context.annotation.EachProperty;
import io.micronaut.context.annotation.Parameter;
import io.micronaut.core.annotation.NonNull;
import io.micronaut.http.MutableHttpRequest;
-import javax.annotation.Generated;
+import {{javaxPackage}}.annotation.Generated;
{{>common/generatedAnnotation}}
diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/model.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/model.mustache
index ed44430d357e..e98fd597002c 100644
--- a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/model.mustache
+++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/model.mustache
@@ -22,17 +22,17 @@ import com.fasterxml.jackson.dataformat.xml.annotation.*;
import com.fasterxml.jackson.annotation.*;
{{/withXml}}
{{#withXml}}
-import javax.xml.bind.annotation.*;
+import {{javaxPackage}}.xml.bind.annotation.*;
{{/withXml}}
{{#parcelableModel}}
import android.os.Parcelable;
import android.os.Parcel;
{{/parcelableModel}}{{#useBeanValidation}}
-import javax.validation.constraints.*;
-import javax.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
import io.micronaut.core.annotation.*;
-import javax.annotation.Generated;
+import {{javaxPackage}}.annotation.Generated;
{{#generateSwagger1Annotations}}
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache
index c98de1654c29..0148785df6b5 100644
--- a/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache
+++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache
@@ -21,7 +21,7 @@ import io.micronaut.http.exceptions.HttpStatusException;
{{#imports}}
import {{import}};
{{/imports}}
-import javax.annotation.Generated;
+import {{javaxPackage}}.annotation.Generated;
{{^fullJavaUtil}}
import java.util.ArrayList;
import java.util.HashMap;
@@ -32,8 +32,8 @@ import java.util.Arrays;
{{/generateControllerFromExamples}}
{{/fullJavaUtil}}
{{#useBeanValidation}}
-import javax.validation.Valid;
-import javax.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
{{/useBeanValidation}}
{{#generateSwagger1Annotations}}
import io.swagger.annotations.*;
diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/ApiOriginFilter.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/ApiOriginFilter.mustache
index b8af270a05a2..05a79d8076bd 100644
--- a/modules/openapi-generator/src/main/resources/java-msf4j-server/ApiOriginFilter.mustache
+++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/ApiOriginFilter.mustache
@@ -2,11 +2,11 @@ package {{apiPackage}};
import java.io.IOException;
-import javax.servlet.*;
-import javax.servlet.http.HttpServletResponse;
+import {{javaxPackage}}.servlet.*;
+import {{javaxPackage}}.servlet.http.HttpServletResponse;
{{>generatedAnnotation}}
-public class ApiOriginFilter implements javax.servlet.Filter {
+public class ApiOriginFilter implements {{javaxPackage}}.servlet.Filter {
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
HttpServletResponse res = (HttpServletResponse) response;
diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/ApiResponseMessage.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/ApiResponseMessage.mustache
index c883e16b5e6c..446b6a1bb699 100644
--- a/modules/openapi-generator/src/main/resources/java-msf4j-server/ApiResponseMessage.mustache
+++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/ApiResponseMessage.mustache
@@ -1,8 +1,8 @@
package {{apiPackage}};
-import javax.xml.bind.annotation.XmlTransient;
+import {{javaxPackage}}.xml.bind.annotation.XmlTransient;
-@javax.xml.bind.annotation.XmlRootElement
+@{{javaxPackage}}.xml.bind.annotation.XmlRootElement
{{>generatedAnnotation}}
public class ApiResponseMessage {
public static final int ERROR = 1;
diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/JodaDateTimeProvider.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/JodaDateTimeProvider.mustache
index f94217909835..32a313d0d669 100644
--- a/modules/openapi-generator/src/main/resources/java-msf4j-server/JodaDateTimeProvider.mustache
+++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/JodaDateTimeProvider.mustache
@@ -4,13 +4,13 @@ import com.sun.jersey.core.spi.component.ComponentContext;
import com.sun.jersey.spi.inject.Injectable;
import com.sun.jersey.spi.inject.PerRequestTypeInjectableProvider;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.core.UriInfo;
-import javax.ws.rs.ext.Provider;
+import {{javaxPackage}}.ws.rs.QueryParam;
+import {{javaxPackage}}.ws.rs.WebApplicationException;
+import {{javaxPackage}}.ws.rs.core.Context;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.Response.Status;
+import {{javaxPackage}}.ws.rs.core.UriInfo;
+import {{javaxPackage}}.ws.rs.ext.Provider;
import org.joda.time.DateTime;
import java.util.List;
diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/JodaLocalDateProvider.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/JodaLocalDateProvider.mustache
index 7bd4027e63dc..0c716032f871 100644
--- a/modules/openapi-generator/src/main/resources/java-msf4j-server/JodaLocalDateProvider.mustache
+++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/JodaLocalDateProvider.mustache
@@ -4,13 +4,13 @@ import com.sun.jersey.core.spi.component.ComponentContext;
import com.sun.jersey.spi.inject.Injectable;
import com.sun.jersey.spi.inject.PerRequestTypeInjectableProvider;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.core.UriInfo;
-import javax.ws.rs.ext.Provider;
+import {{javaxPackage}}.ws.rs.QueryParam;
+import {{javaxPackage}}.ws.rs.WebApplicationException;
+import {{javaxPackage}}.ws.rs.core.Context;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.Response.Status;
+import {{javaxPackage}}.ws.rs.core.UriInfo;
+import {{javaxPackage}}.ws.rs.ext.Provider;
import org.joda.time.LocalDate;
import java.util.List;
diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/LocalDateProvider.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/LocalDateProvider.mustache
index 8c4cd4cbd157..a3c2679abccb 100644
--- a/modules/openapi-generator/src/main/resources/java-msf4j-server/LocalDateProvider.mustache
+++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/LocalDateProvider.mustache
@@ -4,13 +4,13 @@ import com.sun.jersey.core.spi.component.ComponentContext;
import com.sun.jersey.spi.inject.Injectable;
import com.sun.jersey.spi.inject.PerRequestTypeInjectableProvider;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.core.UriInfo;
-import javax.ws.rs.ext.Provider;
+import {{javaxPackage}}.ws.rs.QueryParam;
+import {{javaxPackage}}.ws.rs.WebApplicationException;
+import {{javaxPackage}}.ws.rs.core.Context;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.Response.Status;
+import {{javaxPackage}}.ws.rs.core.UriInfo;
+import {{javaxPackage}}.ws.rs.ext.Provider;
import java.time.LocalDate;
import java.util.List;
diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/OffsetDateTimeProvider.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/OffsetDateTimeProvider.mustache
index 876aeb327be7..e3866677f43b 100644
--- a/modules/openapi-generator/src/main/resources/java-msf4j-server/OffsetDateTimeProvider.mustache
+++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/OffsetDateTimeProvider.mustache
@@ -4,13 +4,13 @@ import com.sun.jersey.core.spi.component.ComponentContext;
import com.sun.jersey.spi.inject.Injectable;
import com.sun.jersey.spi.inject.PerRequestTypeInjectableProvider;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.core.UriInfo;
-import javax.ws.rs.ext.Provider;
+import {{javaxPackage}}.ws.rs.QueryParam;
+import {{javaxPackage}}.ws.rs.WebApplicationException;
+import {{javaxPackage}}.ws.rs.core.Context;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.Response.Status;
+import {{javaxPackage}}.ws.rs.core.UriInfo;
+import {{javaxPackage}}.ws.rs.ext.Provider;
import java.time.OffsetDateTime;
import java.util.List;
diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/api.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/api.mustache
index 360f89a5a97c..9bc9619520dd 100644
--- a/modules/openapi-generator/src/main/resources/java-msf4j-server/api.mustache
+++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/api.mustache
@@ -18,10 +18,10 @@ import java.io.InputStream;
import org.wso2.msf4j.formparam.FormDataParam;
import org.wso2.msf4j.formparam.FileInfo;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
-import javax.ws.rs.*;
+import {{javaxPackage}}.ws.rs.core.Context;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.SecurityContext;
+import {{javaxPackage}}.ws.rs.*;
@Path("{{commonPath}}")
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}}
diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/apiService.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/apiService.mustache
index 37dc9ce24e98..8ecc1eaa5090 100644
--- a/modules/openapi-generator/src/main/resources/java-msf4j-server/apiService.mustache
+++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/apiService.mustache
@@ -14,8 +14,8 @@ import {{package}}.NotFoundException;
import java.io.InputStream;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.SecurityContext;
{{>generatedAnnotation}}
{{#operations}}
diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/apiServiceImpl.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/apiServiceImpl.mustache
index 4b8e213658ec..6df5ba2cb86c 100644
--- a/modules/openapi-generator/src/main/resources/java-msf4j-server/apiServiceImpl.mustache
+++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/apiServiceImpl.mustache
@@ -14,8 +14,8 @@ import java.io.InputStream;
import org.wso2.msf4j.formparam.FormDataParam;
import org.wso2.msf4j.formparam.FileInfo;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
+import {{javaxPackage}}.ws.rs.core.Response;
+import {{javaxPackage}}.ws.rs.core.SecurityContext;
{{>generatedAnnotation}}
{{#operations}}
diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/bootstrap.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/bootstrap.mustache
index f7e8efff419f..32fd6a1f5e05 100644
--- a/modules/openapi-generator/src/main/resources/java-msf4j-server/bootstrap.mustache
+++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/bootstrap.mustache
@@ -5,10 +5,10 @@ import io.swagger.models.*;
import io.swagger.models.auth.*;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
+import {{javaxPackage}}.servlet.http.HttpServlet;
+import {{javaxPackage}}.servlet.ServletContext;
+import {{javaxPackage}}.servlet.ServletConfig;
+import {{javaxPackage}}.servlet.ServletException;
public class Bootstrap extends HttpServlet {
@Override
diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/generatedAnnotation.mustache
index 875d7b97afee..f408f3199b8e 100644
--- a/modules/openapi-generator/src/main/resources/java-msf4j-server/generatedAnnotation.mustache
+++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/generatedAnnotation.mustache
@@ -1 +1 @@
-@javax.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
+@{{javaxPackage}}.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/jacksonJsonProvider.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/jacksonJsonProvider.mustache
index e82da4051f74..a352613bc71b 100644
--- a/modules/openapi-generator/src/main/resources/java-msf4j-server/jacksonJsonProvider.mustache
+++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/jacksonJsonProvider.mustache
@@ -6,9 +6,9 @@ import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.joda.JodaModule;
import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.ext.Provider;
+import {{javaxPackage}}.ws.rs.Produces;
+import {{javaxPackage}}.ws.rs.core.MediaType;
+import {{javaxPackage}}.ws.rs.ext.Provider;
@Provider
@Produces({MediaType.APPLICATION_JSON})
diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/api.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/api.mustache
index 97a2c15f0ca9..7b3078958c8b 100644
--- a/modules/openapi-generator/src/main/resources/java-pkmst/api.mustache
+++ b/modules/openapi-generator/src/main/resources/java-pkmst/api.mustache
@@ -28,8 +28,8 @@ import java.util.concurrent.{{^jdk8}}Callable{{/jdk8}}{{#jdk8}}CompletableFuture
{{/async}}
{{#useBeanValidation}}
import org.springframework.validation.annotation.Validated;
-import javax.validation.constraints.*;
-import javax.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
/**
* Provides the info about api methods
diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/apiController.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/apiController.mustache
index 622a703ef7e1..70f94ba77721 100644
--- a/modules/openapi-generator/src/main/resources/java-pkmst/apiController.mustache
+++ b/modules/openapi-generator/src/main/resources/java-pkmst/apiController.mustache
@@ -32,8 +32,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
{{/useSpringCloudClient}}
{{#useBeanValidation}}
-import javax.validation.constraints.*;
-import javax.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
/**
* Api implementation
diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/generatedAnnotation.mustache
index 875d7b97afee..f408f3199b8e 100644
--- a/modules/openapi-generator/src/main/resources/java-pkmst/generatedAnnotation.mustache
+++ b/modules/openapi-generator/src/main/resources/java-pkmst/generatedAnnotation.mustache
@@ -1 +1 @@
-@javax.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
+@{{javaxPackage}}.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/logging/httpLoggingFilter.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/logging/httpLoggingFilter.mustache
index b59de5c2d3b7..7869ab365996 100644
--- a/modules/openapi-generator/src/main/resources/java-pkmst/logging/httpLoggingFilter.mustache
+++ b/modules/openapi-generator/src/main/resources/java-pkmst/logging/httpLoggingFilter.mustache
@@ -14,27 +14,27 @@ import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ReadListener;
-import javax.servlet.ServletException;
-import javax.servlet.ServletInputStream;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.WriteListener;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletRequestWrapper;
-import javax.servlet.http.HttpServletResponse;
+import {{javaxPackage}}.servlet.Filter;
+import {{javaxPackage}}.servlet.FilterChain;
+import {{javaxPackage}}.servlet.FilterConfig;
+import {{javaxPackage}}.servlet.ReadListener;
+import {{javaxPackage}}.servlet.ServletException;
+import {{javaxPackage}}.servlet.ServletInputStream;
+import {{javaxPackage}}.servlet.ServletOutputStream;
+import {{javaxPackage}}.servlet.ServletRequest;
+import {{javaxPackage}}.servlet.ServletResponse;
+import {{javaxPackage}}.servlet.WriteListener;
+import {{javaxPackage}}.servlet.http.Cookie;
+import {{javaxPackage}}.servlet.http.HttpServletRequest;
+import {{javaxPackage}}.servlet.http.HttpServletRequestWrapper;
+import {{javaxPackage}}.servlet.http.HttpServletResponse;
import java.util.Arrays;
import org.apache.commons.io.output.TeeOutputStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
/**
- * Implements javax.servlet.Filter and dump the request/response to syslog
+ * Implements {{javaxPackage}}.servlet.Filter and dump the request/response to syslog
* @author pkmst
*
*/
diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/model.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/model.mustache
index ef8b9e7422e5..7a71d8c0720a 100644
--- a/modules/openapi-generator/src/main/resources/java-pkmst/model.mustache
+++ b/modules/openapi-generator/src/main/resources/java-pkmst/model.mustache
@@ -8,8 +8,8 @@ import java.io.Serializable;
{{/serializableModel}}
{{#useBeanValidation}}
import org.springframework.validation.annotation.Validated;
-import javax.validation.Valid;
-import javax.validation.constraints.*;
+import {{javaxPackage}}.validation.Valid;
+import {{javaxPackage}}.validation.constraints.*;
{{/useBeanValidation}}
{{#jackson}}
{{#withXml}}
@@ -18,7 +18,7 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
{{/withXml}}
{{/jackson}}
{{#withXml}}
-import javax.xml.bind.annotation.*;
+import {{javaxPackage}}.xml.bind.annotation.*;
{{/withXml}}
/**
* Response class to be returned by Api
diff --git a/modules/openapi-generator/src/main/resources/java-undertow-server/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/java-undertow-server/generatedAnnotation.mustache
index 10843695a9af..2ec266639d7e 100644
--- a/modules/openapi-generator/src/main/resources/java-undertow-server/generatedAnnotation.mustache
+++ b/modules/openapi-generator/src/main/resources/java-undertow-server/generatedAnnotation.mustache
@@ -1 +1 @@
-@javax.annotation.Generated(value = "{{{generatorClass}}}"{{^hideGenerationTimestamp}}, date = "{{{generatedDate}}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
+@{{javaxPackage}}.annotation.Generated(value = "{{{generatorClass}}}"{{^hideGenerationTimestamp}}, date = "{{{generatedDate}}}"{{/hideGenerationTimestamp}})
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/java-undertow-server/handler.mustache b/modules/openapi-generator/src/main/resources/java-undertow-server/handler.mustache
index acf876b7975a..c9cced5f9aee 100644
--- a/modules/openapi-generator/src/main/resources/java-undertow-server/handler.mustache
+++ b/modules/openapi-generator/src/main/resources/java-undertow-server/handler.mustache
@@ -33,7 +33,7 @@ abstract public class PathHandlerProvider implements HandlerProvider, PathHandle
/**
* Returns the default base path to access this server.
*/
- @javax.annotation.Nonnull
+ @{{javaxPackage}}.annotation.Nonnull
public String getBasePath() {
return "{{{basePathWithoutHost}}}";
}
@@ -52,7 +52,7 @@ abstract public class PathHandlerProvider implements HandlerProvider, PathHandle
*
* @return an {@link HttpHandler} of type {@link RoutingHandler}
*/
- @javax.annotation.Nonnull
+ @{{javaxPackage}}.annotation.Nonnull
@Override
public HttpHandler getHandler() {
return getHandler(false);
@@ -67,7 +67,7 @@ abstract public class PathHandlerProvider implements HandlerProvider, PathHandle
* @param withBasePath if true, all endpoints would start with "{{{basePathWithoutHost}}}"
* @return an {@link HttpHandler} of type {@link RoutingHandler}
*/
- @javax.annotation.Nonnull
+ @{{javaxPackage}}.annotation.Nonnull
public HttpHandler getHandler(final boolean withBasePath) {
return getHandler(withBasePath ? getBasePath() : "");
}
@@ -82,7 +82,7 @@ abstract public class PathHandlerProvider implements HandlerProvider, PathHandle
* @return an {@link HttpHandler} of type {@link RoutingHandler}
*/
@SuppressWarnings("Convert2Lambda")
- @javax.annotation.Nonnull
+ @{{javaxPackage}}.annotation.Nonnull
public HttpHandler getHandler(final String basePath) {
return Handlers.routing()
{{#apiInfo}}
@@ -116,7 +116,7 @@ abstract public class PathHandlerProvider implements HandlerProvider, PathHandle
*
* @return an {@link HttpHandler} of type {@link RoutingHandler}
*/
- @javax.annotation.Nonnull
+ @{{javaxPackage}}.annotation.Nonnull
public HttpHandler getStatefulHandler() {
return getStatefulHandler(false);
}
@@ -130,7 +130,7 @@ abstract public class PathHandlerProvider implements HandlerProvider, PathHandle
* @param withBasePath if true, all endpoints would start with "{{{basePathWithoutHost}}}"
* @return an {@link HttpHandler} of type {@link RoutingHandler}
*/
- @javax.annotation.Nonnull
+ @{{javaxPackage}}.annotation.Nonnull
public HttpHandler getStatefulHandler(final boolean withBasePath) {
return getStatefulHandler(withBasePath ? getBasePath() : "");
}
@@ -144,7 +144,7 @@ abstract public class PathHandlerProvider implements HandlerProvider, PathHandle
* @param basePath base path to set for all endpoints
* @return an {@link HttpHandler} of type {@link RoutingHandler}
*/
- @javax.annotation.Nonnull
+ @{{javaxPackage}}.annotation.Nonnull
public HttpHandler getStatefulHandler(final String basePath) {
return Handlers.routing()
{{#apiInfo}}
diff --git a/modules/openapi-generator/src/main/resources/java-undertow-server/interface.mustache b/modules/openapi-generator/src/main/resources/java-undertow-server/interface.mustache
index a0b43fbc9fd8..d2c1f3996b2e 100644
--- a/modules/openapi-generator/src/main/resources/java-undertow-server/interface.mustache
+++ b/modules/openapi-generator/src/main/resources/java-undertow-server/interface.mustache
@@ -65,7 +65,7 @@ public interface PathHandlerInterface {
{{/responses}}
*
*/
- @javax.annotation.Nonnull
+ @{{javaxPackage}}.annotation.Nonnull
{{#isDeprecated}} @Deprecated
{{/isDeprecated}}
HttpHandler {{{operationId}}}();
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java
index fb1f01b7e150..8c8ec848bb25 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java
@@ -1523,7 +1523,6 @@ public void requiredFieldShouldIncludeNotNullAnnotationJakarta_issue13365_issue1
codegen.additionalProperties().put(SpringCodegen.USE_BEANVALIDATION, "false");
codegen.additionalProperties().put(SpringCodegen.PERFORM_BEANVALIDATION, "false");
codegen.additionalProperties().put(SpringCodegen.USE_SPRING_BOOT3, "true");
- codegen.additionalProperties().put(SpringCodegen.USE_JAKARTA_EE, "true");
codegen.additionalProperties().put(SpringCodegen.OPENAPI_NULLABLE, "false");
codegen.additionalProperties().put(SpringCodegen.UNHANDLED_EXCEPTION_HANDLING, "false");
codegen.additionalProperties().put(CodegenConstants.SORT_MODEL_PROPERTIES_BY_REQUIRED_FLAG, "false");
diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApiController.java
index 119729502644..87d02eed2dfc 100644
--- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApiController.java
+++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApiController.java
@@ -19,8 +19,8 @@
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.context.request.NativeWebRequest;
-import jakarta.validation.Valid;
import jakarta.validation.constraints.*;
+import jakarta.validation.Valid;
import java.util.List;
import java.util.Map;
diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApiController.java
index eaca23c3f81f..23187514cb8f 100644
--- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApiController.java
+++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApiController.java
@@ -19,8 +19,8 @@
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.context.request.NativeWebRequest;
-import jakarta.validation.Valid;
import jakarta.validation.constraints.*;
+import jakarta.validation.Valid;
import java.util.List;
import java.util.Map;
diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApiController.java
index 412a400d7d02..6f41ccc46f61 100644
--- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApiController.java
+++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApiController.java
@@ -20,8 +20,8 @@
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.context.request.NativeWebRequest;
-import jakarta.validation.Valid;
import jakarta.validation.constraints.*;
+import jakarta.validation.Valid;
import java.util.List;
import java.util.Map;