diff --git a/bin/java-petstore-feign.sh b/bin/java-petstore-feign.sh
index abac67deb9d..48038613a82 100755
--- a/bin/java-petstore-feign.sh
+++ b/bin/java-petstore-feign.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/feign -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-feign-9x.json -o samples/client/petstore/java/feign --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is $@"
+ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/feign -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-feign-9x.json -o samples/client/petstore/java/feign --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is,additionalModelTypeAnnotations=@javax.annotation.concurrent.Immutable $@"
echo "Removing files and folders under samples/client/petstore/java/feign/src/main"
rm -rf samples/client/petstore/java/feign/src/main
diff --git a/bin/windows/java-petstore-feign.bat b/bin/windows/java-petstore-feign.bat
index e68e2d818f7..261965dcb6f 100644
--- a/bin/windows/java-petstore-feign.bat
+++ b/bin/windows/java-petstore-feign.bat
@@ -5,6 +5,6 @@ If Not Exist %executable% (
)
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
-set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\feign -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-feign-9x.json -o samples\client\petstore\java\feign --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is
+set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\feign -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-feign-9x.json -o samples\client\petstore\java\feign --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is,additionalModelTypeAnnotations=@javax.annotation.concurrent.Immutable
java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md
index 7dcf10b0777..688b2b1ac93 100644
--- a/docs/generators/groovy.md
+++ b/docs/generators/groovy.md
@@ -34,6 +34,7 @@ sidebar_label: groovy
|java8|Option. Use Java8 classes instead of third party equivalents|
- **true**
- Use Java 8 classes such as Base64
- **false**
- Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
+|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md
index 4d3c774468e..37856678e67 100644
--- a/docs/generators/java-inflector.md
+++ b/docs/generators/java-inflector.md
@@ -36,6 +36,7 @@ sidebar_label: java-inflector
|java8|Option. Use Java8 classes instead of third party equivalents|- **true**
- Use Java 8 classes such as Base64
- **false**
- Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
+|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md
index 543aa97f828..ece46f99046 100644
--- a/docs/generators/java-msf4j.md
+++ b/docs/generators/java-msf4j.md
@@ -36,6 +36,7 @@ sidebar_label: java-msf4j
|java8|Option. Use Java8 classes instead of third party equivalents|- **true**
- Use Java 8 classes such as Base64
- **false**
- Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
+|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md
index 6d33790e60c..30eff4add44 100644
--- a/docs/generators/java-pkmst.md
+++ b/docs/generators/java-pkmst.md
@@ -36,6 +36,7 @@ sidebar_label: java-pkmst
|java8|Option. Use Java8 classes instead of third party equivalents|- **true**
- Use Java 8 classes such as Base64
- **false**
- Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
+|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md
index b7fa80b5823..bad8968d3e2 100644
--- a/docs/generators/java-play-framework.md
+++ b/docs/generators/java-play-framework.md
@@ -36,6 +36,7 @@ sidebar_label: java-play-framework
|java8|Option. Use Java8 classes instead of third party equivalents|- **true**
- Use Java 8 classes such as Base64
- **false**
- Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
+|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md
index c620227b1ee..6b780fa3f41 100644
--- a/docs/generators/java-undertow-server.md
+++ b/docs/generators/java-undertow-server.md
@@ -36,6 +36,7 @@ sidebar_label: java-undertow-server
|java8|Option. Use Java8 classes instead of third party equivalents|- **true**
- Use Java 8 classes such as Base64
- **false**
- Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
+|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md
index 059acc0a2a0..23aee105dd9 100644
--- a/docs/generators/java-vertx-web.md
+++ b/docs/generators/java-vertx-web.md
@@ -36,6 +36,7 @@ sidebar_label: java-vertx-web
|java8|Option. Use Java8 classes instead of third party equivalents|- **true**
- Use Java 8 classes such as Base64
- **false**
- Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
+|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md
index e285f021a16..27240770c34 100644
--- a/docs/generators/java-vertx.md
+++ b/docs/generators/java-vertx.md
@@ -36,6 +36,7 @@ sidebar_label: java-vertx
|java8|Option. Use Java8 classes instead of third party equivalents|- **true**
- Use Java 8 classes such as Base64
- **false**
- Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
+|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
diff --git a/docs/generators/java.md b/docs/generators/java.md
index 2ac7fbeaab5..108381ededa 100644
--- a/docs/generators/java.md
+++ b/docs/generators/java.md
@@ -36,6 +36,7 @@ sidebar_label: java
|java8|Option. Use Java8 classes instead of third party equivalents|- **true**
- Use Java 8 classes such as Base64
- **false**
- Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
+|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md
index e90da21468b..5a1cbe843b4 100644
--- a/docs/generators/jaxrs-cxf-cdi.md
+++ b/docs/generators/jaxrs-cxf-cdi.md
@@ -36,6 +36,7 @@ sidebar_label: jaxrs-cxf-cdi
|java8|Option. Use Java8 classes instead of third party equivalents|- **true**
- Use Java 8 classes such as Base64
- **false**
- Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
+|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md
index 8b9ea2186ac..46f554eb3d8 100644
--- a/docs/generators/jaxrs-cxf-client.md
+++ b/docs/generators/jaxrs-cxf-client.md
@@ -36,6 +36,7 @@ sidebar_label: jaxrs-cxf-client
|java8|Option. Use Java8 classes instead of third party equivalents|- **true**
- Use Java 8 classes such as Base64
- **false**
- Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
+|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md
index df0d2004bd0..9259685cc18 100644
--- a/docs/generators/jaxrs-cxf-extended.md
+++ b/docs/generators/jaxrs-cxf-extended.md
@@ -36,6 +36,7 @@ sidebar_label: jaxrs-cxf-extended
|java8|Option. Use Java8 classes instead of third party equivalents|- **true**
- Use Java 8 classes such as Base64
- **false**
- Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
+|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md
index bae14d53f14..bcb14352a97 100644
--- a/docs/generators/jaxrs-cxf.md
+++ b/docs/generators/jaxrs-cxf.md
@@ -36,6 +36,7 @@ sidebar_label: jaxrs-cxf
|java8|Option. Use Java8 classes instead of third party equivalents|- **true**
- Use Java 8 classes such as Base64
- **false**
- Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
+|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md
index 16419d4bf5f..ee1782b7337 100644
--- a/docs/generators/jaxrs-jersey.md
+++ b/docs/generators/jaxrs-jersey.md
@@ -36,6 +36,7 @@ sidebar_label: jaxrs-jersey
|java8|Option. Use Java8 classes instead of third party equivalents|- **true**
- Use Java 8 classes such as Base64
- **false**
- Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
+|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md
index 615d5702600..baa90886e53 100644
--- a/docs/generators/jaxrs-resteasy-eap.md
+++ b/docs/generators/jaxrs-resteasy-eap.md
@@ -36,6 +36,7 @@ sidebar_label: jaxrs-resteasy-eap
|java8|Option. Use Java8 classes instead of third party equivalents|- **true**
- Use Java 8 classes such as Base64
- **false**
- Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
+|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md
index 885caa88962..62e6fc5254e 100644
--- a/docs/generators/jaxrs-resteasy.md
+++ b/docs/generators/jaxrs-resteasy.md
@@ -36,6 +36,7 @@ sidebar_label: jaxrs-resteasy
|java8|Option. Use Java8 classes instead of third party equivalents|- **true**
- Use Java 8 classes such as Base64
- **false**
- Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
+|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md
index e70657aa2fc..1051b458ecd 100644
--- a/docs/generators/jaxrs-spec.md
+++ b/docs/generators/jaxrs-spec.md
@@ -36,6 +36,7 @@ sidebar_label: jaxrs-spec
|java8|Option. Use Java8 classes instead of third party equivalents|- **true**
- Use Java 8 classes such as Base64
- **false**
- Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
+|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
diff --git a/docs/generators/spring.md b/docs/generators/spring.md
index c122ddcb4de..082d3fbd0d5 100644
--- a/docs/generators/spring.md
+++ b/docs/generators/spring.md
@@ -36,6 +36,7 @@ sidebar_label: spring
|java8|Option. Use Java8 classes instead of third party equivalents|- **true**
- Use Java 8 classes such as Base64. Use java8 default interface when a responseWrapper is used
- **false**
- Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
+|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
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 4d99af1c058..7bc938a6811 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
@@ -54,6 +54,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
public static final String SUPPORT_JAVA6 = "supportJava6";
public static final String DISABLE_HTML_ESCAPING = "disableHtmlEscaping";
public static final String BOOLEAN_GETTER_PREFIX = "booleanGetterPrefix";
+ public static final String ADDITIONAL_MODEL_TYPE_ANNOTATIONS = "additionalModelTypeAnnotations";
protected String dateLibrary = "threetenbp";
protected boolean supportAsync = false;
@@ -91,6 +92,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
protected String parentArtifactId = "";
protected String parentVersion = "";
protected boolean parentOverridden = false;
+ protected List additionalModelTypeAnnotations = new LinkedList<>();
public AbstractJavaCodegen() {
super();
@@ -184,6 +186,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
cliOptions.add(CliOption.newBoolean(DISABLE_HTML_ESCAPING, "Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)", disableHtmlEscaping));
cliOptions.add(CliOption.newString(BOOLEAN_GETTER_PREFIX, "Set booleanGetterPrefix").defaultValue(this.getBooleanGetterPrefix()));
+ cliOptions.add(CliOption.newString(ADDITIONAL_MODEL_TYPE_ANNOTATIONS, "Additional annotations for model type(class level annotations)"));
cliOptions.add(CliOption.newString(CodegenConstants.PARENT_GROUP_ID, CodegenConstants.PARENT_GROUP_ID_DESC));
cliOptions.add(CliOption.newString(CodegenConstants.PARENT_ARTIFACT_ID, CodegenConstants.PARENT_ARTIFACT_ID_DESC));
@@ -221,6 +224,12 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
}
additionalProperties.put(BOOLEAN_GETTER_PREFIX, booleanGetterPrefix);
+ if (additionalProperties.containsKey(ADDITIONAL_MODEL_TYPE_ANNOTATIONS)) {
+ String additionalAnnotationsList = additionalProperties.get(ADDITIONAL_MODEL_TYPE_ANNOTATIONS).toString();
+
+ this.setAdditionalModelTypeAnnotations(Arrays.asList(additionalAnnotationsList.split(";")));
+ }
+
if (additionalProperties.containsKey(CodegenConstants.INVOKER_PACKAGE)) {
this.setInvokerPackage((String) additionalProperties.get(CodegenConstants.INVOKER_PACKAGE));
} else if (additionalProperties.containsKey(CodegenConstants.API_PACKAGE)) {
@@ -488,6 +497,20 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
}
}
+ @Override
+ public Map postProcessAllModels(Map objs) {
+ objs = super.updateAllModels(objs);
+
+ if (!additionalModelTypeAnnotations.isEmpty()) {
+ for (String modelName : objs.keySet()) {
+ Map models = (Map) objs.get(modelName);
+ models.put(ADDITIONAL_MODEL_TYPE_ANNOTATIONS, additionalModelTypeAnnotations);
+ }
+ }
+
+ return objs;
+ }
+
private void sanitizeConfig() {
// Sanitize any config options here. We also have to update the additionalProperties because
// the whole additionalProperties object is injected into the main object passed to the mustache layer
@@ -1547,6 +1570,10 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
this.parentOverridden = parentOverridden;
}
+ public void setAdditionalModelTypeAnnotations(final List additionalModelTypeAnnotations) {
+ this.additionalModelTypeAnnotations = additionalModelTypeAnnotations;
+ }
+
@Override
protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) {
super.addAdditionPropertiesToCodeGenModel(codegenModel, schema);
diff --git a/modules/openapi-generator/src/main/resources/Java/additionalModelTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/Java/additionalModelTypeAnnotations.mustache
new file mode 100644
index 00000000000..e5dc1ac1295
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/Java/additionalModelTypeAnnotations.mustache
@@ -0,0 +1,2 @@
+{{#additionalModelTypeAnnotations}}{{.}}
+{{/additionalModelTypeAnnotations}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/Java/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/pojo.mustache
index 9814954cc4b..796f9a7ec14 100644
--- a/modules/openapi-generator/src/main/resources/Java/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/pojo.mustache
@@ -9,7 +9,7 @@
{{/vars}}
})
{{/jackson}}
-{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}}
+{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}}
public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcelableModel}}implements Parcelable {{#serializableModel}}, Serializable {{/serializableModel}}{{/parcelableModel}}{{^parcelableModel}}{{#serializableModel}}implements Serializable {{/serializableModel}}{{/parcelableModel}}{
{{#serializableModel}}
private static final long serialVersionUID = 1L;
diff --git a/modules/openapi-generator/src/main/resources/JavaInflector/additionalModelTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/JavaInflector/additionalModelTypeAnnotations.mustache
new file mode 100644
index 00000000000..e5dc1ac1295
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/JavaInflector/additionalModelTypeAnnotations.mustache
@@ -0,0 +1,2 @@
+{{#additionalModelTypeAnnotations}}{{.}}
+{{/additionalModelTypeAnnotations}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaInflector/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaInflector/pojo.mustache
index badfdbc35a3..34c34a0ec26 100644
--- a/modules/openapi-generator/src/main/resources/JavaInflector/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaInflector/pojo.mustache
@@ -1,5 +1,5 @@
{{#description}}@ApiModel(description = "{{{description}}}"){{/description}}
-{{>generatedAnnotation}}
+{{>generatedAnnotation}}{{>additionalModelTypeAnnotations}}
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
{{#vars}}
{{#isEnum}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/additionalModelTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/additionalModelTypeAnnotations.mustache
new file mode 100644
index 00000000000..e5dc1ac1295
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/additionalModelTypeAnnotations.mustache
@@ -0,0 +1,2 @@
+{{#additionalModelTypeAnnotations}}{{.}}
+{{/additionalModelTypeAnnotations}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/additionalModelTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/additionalModelTypeAnnotations.mustache
new file mode 100644
index 00000000000..e5dc1ac1295
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/additionalModelTypeAnnotations.mustache
@@ -0,0 +1,2 @@
+{{#additionalModelTypeAnnotations}}{{.}}
+{{/additionalModelTypeAnnotations}}
\ No newline at end of file
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 8c5e307bdcd..6d50290d16e 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
@@ -3,7 +3,7 @@ import java.util.Objects;
import javax.xml.bind.annotation.*;
-{{#description}}@ApiModel(description = "{{{description}}}"){{/description}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}
+{{#description}}@ApiModel(description = "{{{description}}}"){{/description}}{{>additionalModelTypeAnnotations}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
{{#vars}}{{#isEnum}}{{^isContainer}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/additionalModelTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/additionalModelTypeAnnotations.mustache
new file mode 100644
index 00000000000..e5dc1ac1295
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/additionalModelTypeAnnotations.mustache
@@ -0,0 +1,2 @@
+{{#additionalModelTypeAnnotations}}{{.}}
+{{/additionalModelTypeAnnotations}}
\ No newline at end of file
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 402331f1fbf..bca023bfb80 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
@@ -22,7 +22,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* {{{description}}}
*/
@ApiModel(description="{{{description}}}")
-{{/description}}
+{{/description}}{{>additionalModelTypeAnnotations}}
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}}{{#serializableModel}} implements Serializable{{/serializableModel}} {
{{#vars}}{{#isEnum}}{{^isContainer}}
{{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/additionalModelTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/additionalModelTypeAnnotations.mustache
new file mode 100644
index 00000000000..e5dc1ac1295
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/additionalModelTypeAnnotations.mustache
@@ -0,0 +1,2 @@
+{{#additionalModelTypeAnnotations}}{{.}}
+{{/additionalModelTypeAnnotations}}
\ No newline at end of file
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 df02462ff23..df99f136dc2 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pojo.mustache
@@ -14,7 +14,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
**/
@ApiModel(description="{{{description}}}")
{{/description}}
-{{>xmlPojoAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}}{{#serializableModel}} implements Serializable{{/serializableModel}} {
+{{>additionalModelTypeAnnotations}}{{>xmlPojoAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}}{{#serializableModel}} implements Serializable{{/serializableModel}} {
{{#vars}}{{#isEnum}}{{^isContainer}}
{{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}}
{{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/pojo.mustache
index 302b7e257c8..7dc314102f4 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/pojo.mustache
@@ -9,7 +9,7 @@
{{/vars}}
})
{{/jackson}}
-{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}
+{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
{{#vars}}
{{#isEnum}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/additionalModelTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/additionalModelTypeAnnotations.mustache
new file mode 100644
index 00000000000..e5dc1ac1295
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/additionalModelTypeAnnotations.mustache
@@ -0,0 +1,2 @@
+{{#additionalModelTypeAnnotations}}{{.}}
+{{/additionalModelTypeAnnotations}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/additionalModelTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/additionalModelTypeAnnotations.mustache
new file mode 100644
index 00000000000..e5dc1ac1295
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/additionalModelTypeAnnotations.mustache
@@ -0,0 +1,2 @@
+{{#additionalModelTypeAnnotations}}{{.}}
+{{/additionalModelTypeAnnotations}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pojo.mustache
index a3262bd41d5..9b66957fbf1 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pojo.mustache
@@ -1,6 +1,6 @@
import io.swagger.annotations.*;
-{{#description}}@ApiModel(description="{{{description}}}"){{/description}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}
+{{#description}}@ApiModel(description="{{{description}}}"){{/description}}{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
{{#serializableModel}}
private static final long serialVersionUID = 1L;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pojo.mustache
index cbb6c907150..3e3815c4aeb 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pojo.mustache
@@ -1,6 +1,6 @@
import io.swagger.annotations.*;
-{{#description}}@ApiModel(description="{{{description}}}"){{/description}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}
+{{#description}}@ApiModel(description="{{{description}}}"){{/description}}{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
{{#serializableModel}}
private static final long serialVersionUID = 1L;
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/additionalModelTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/additionalModelTypeAnnotations.mustache
new file mode 100644
index 00000000000..e5dc1ac1295
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/additionalModelTypeAnnotations.mustache
@@ -0,0 +1,2 @@
+{{#additionalModelTypeAnnotations}}{{.}}
+{{/additionalModelTypeAnnotations}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache
index aecf440129d..dc9bd039d02 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache
@@ -10,7 +10,7 @@ import com.fasterxml.jackson.annotation.JsonValue;
/**
* {{description}}
**/{{/description}}{{#useSwaggerAnnotations}}
-{{#description}}@ApiModel(description = "{{{description}}}"){{/description}}{{/useSwaggerAnnotations}}
+{{#description}}{{>additionalModelTypeAnnotations}}@ApiModel(description = "{{{description}}}"){{/description}}{{/useSwaggerAnnotations}}
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
{{#vars}}{{#isEnum}}{{^isContainer}}
diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/additionalModelTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/additionalModelTypeAnnotations.mustache
new file mode 100644
index 00000000000..e5dc1ac1295
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/additionalModelTypeAnnotations.mustache
@@ -0,0 +1,2 @@
+{{#additionalModelTypeAnnotations}}{{.}}
+{{/additionalModelTypeAnnotations}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache
index 164bbcea5d9..f047ee98336 100644
--- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache
@@ -5,7 +5,7 @@ import javax.validation.constraints.*;
/**
* {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}}
*/
-{{>generatedAnnotation}}
+{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
{{#vars}}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/additionalModelTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/additionalModelTypeAnnotations.mustache
new file mode 100644
index 00000000000..e5dc1ac1295
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/additionalModelTypeAnnotations.mustache
@@ -0,0 +1,2 @@
+{{#additionalModelTypeAnnotations}}{{.}}
+{{/additionalModelTypeAnnotations}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache
index 5ccc8a8c936..9c748649e5f 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache
@@ -2,7 +2,7 @@
* {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}}
*/{{#description}}
@ApiModel(description = "{{{description}}}"){{/description}}
-{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}}
+{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}}{{>additionalModelTypeAnnotations}}
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}}{{^parent}}{{#hateoas}}extends RepresentationModel<{{classname}}> {{/hateoas}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
{{#serializableModel}}
private static final long serialVersionUID = 1L;
diff --git a/modules/openapi-generator/src/main/resources/JavaVertXServer/additionalModelTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/JavaVertXServer/additionalModelTypeAnnotations.mustache
new file mode 100644
index 00000000000..e5dc1ac1295
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/JavaVertXServer/additionalModelTypeAnnotations.mustache
@@ -0,0 +1,2 @@
+{{#additionalModelTypeAnnotations}}{{.}}
+{{/additionalModelTypeAnnotations}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaVertXServer/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaVertXServer/pojo.mustache
index 014ba3e2b43..8a1d4180d44 100644
--- a/modules/openapi-generator/src/main/resources/JavaVertXServer/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaVertXServer/pojo.mustache
@@ -1,4 +1,4 @@
-@JsonInclude(JsonInclude.Include.NON_NULL)
+{{>additionalModelTypeAnnotations}}@JsonInclude(JsonInclude.Include.NON_NULL)
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
{{#vars}}{{#isEnum}}{{^isContainer}}
diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/additionalModelTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/additionalModelTypeAnnotations.mustache
new file mode 100644
index 00000000000..e5dc1ac1295
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/additionalModelTypeAnnotations.mustache
@@ -0,0 +1,2 @@
+{{#additionalModelTypeAnnotations}}{{.}}
+{{/additionalModelTypeAnnotations}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/pojo.mustache
index 014ba3e2b43..8a1d4180d44 100644
--- a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/pojo.mustache
@@ -1,4 +1,4 @@
-@JsonInclude(JsonInclude.Include.NON_NULL)
+{{>additionalModelTypeAnnotations}}@JsonInclude(JsonInclude.Include.NON_NULL)
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
{{#vars}}{{#isEnum}}{{^isContainer}}
diff --git a/modules/openapi-generator/src/main/resources/apex/additionalModelTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/apex/additionalModelTypeAnnotations.mustache
new file mode 100644
index 00000000000..e5dc1ac1295
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/apex/additionalModelTypeAnnotations.mustache
@@ -0,0 +1,2 @@
+{{#additionalModelTypeAnnotations}}{{.}}
+{{/additionalModelTypeAnnotations}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/apex/pojo.mustache b/modules/openapi-generator/src/main/resources/apex/pojo.mustache
index 320b90922d8..9f192178eea 100644
--- a/modules/openapi-generator/src/main/resources/apex/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/apex/pojo.mustache
@@ -1,6 +1,6 @@
/**
* {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}}
- */
+ */{{>additionalModelTypeAnnotations}}
public class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}{{#interfaces}}{{#-first}} implements {{/-first}}{{^-first}}, {{/-first}}{{.}}{{/interfaces}} {
{{#vars}}
{{#isEnum}}
diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/additionalModelTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/additionalModelTypeAnnotations.mustache
new file mode 100644
index 00000000000..e5dc1ac1295
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/additionalModelTypeAnnotations.mustache
@@ -0,0 +1,2 @@
+{{#additionalModelTypeAnnotations}}{{.}}
+{{/additionalModelTypeAnnotations}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/pojo.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/pojo.mustache
index 38559db8fb4..7f44c8fd125 100644
--- a/modules/openapi-generator/src/main/resources/java-msf4j-server/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/pojo.mustache
@@ -2,7 +2,7 @@
* {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}}
*/{{#description}}
@ApiModel(description = "{{{description}}}"){{/description}}
-{{>generatedAnnotation}}
+{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
{{#vars}}
{{#isEnum}}
diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/additionalModelTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/additionalModelTypeAnnotations.mustache
new file mode 100644
index 00000000000..e5dc1ac1295
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/java-pkmst/additionalModelTypeAnnotations.mustache
@@ -0,0 +1,2 @@
+{{#additionalModelTypeAnnotations}}{{.}}
+{{/additionalModelTypeAnnotations}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/pojo.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/pojo.mustache
index 5b853d80943..ddf67509268 100644
--- a/modules/openapi-generator/src/main/resources/java-pkmst/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/java-pkmst/pojo.mustache
@@ -3,7 +3,7 @@
*/{{#description}}
@ApiModel(description = "{{{description}}}"){{/description}}
{{#useBeanValidation}}@Validated{{/useBeanValidation}}
-{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}}
+{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}}{{>additionalModelTypeAnnotations}}
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
{{#serializableModel}}
private static final long serialVersionUID = 1L;
diff --git a/modules/openapi-generator/src/main/resources/java-undertow-server/additionalModelTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/java-undertow-server/additionalModelTypeAnnotations.mustache
new file mode 100644
index 00000000000..e5dc1ac1295
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/java-undertow-server/additionalModelTypeAnnotations.mustache
@@ -0,0 +1,2 @@
+{{#additionalModelTypeAnnotations}}{{.}}
+{{/additionalModelTypeAnnotations}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/java-undertow-server/pojo.mustache b/modules/openapi-generator/src/main/resources/java-undertow-server/pojo.mustache
index 5fb61ee6fc0..6590268dc96 100644
--- a/modules/openapi-generator/src/main/resources/java-undertow-server/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/java-undertow-server/pojo.mustache
@@ -1,5 +1,5 @@
{{#description}}@ApiModel(description = "{{{description}}}"){{/description}}
-{{>generatedAnnotation}}
+{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
{{#vars}}{{#isEnum}}{{^isContainer}}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
index 0f1223c2bc6..b3b18538873 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
@@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
AdditionalPropertiesAnyType.JSON_PROPERTY_NAME
})
+@javax.annotation.concurrent.Immutable
public class AdditionalPropertiesAnyType extends HashMap {
public static final String JSON_PROPERTY_NAME = "name";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
index c03535ab947..b096a099e9d 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
@@ -32,6 +32,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
AdditionalPropertiesArray.JSON_PROPERTY_NAME
})
+@javax.annotation.concurrent.Immutable
public class AdditionalPropertiesArray extends HashMap {
public static final String JSON_PROPERTY_NAME = "name";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
index 4356a4f8c1e..cb08b798a87 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
@@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
AdditionalPropertiesBoolean.JSON_PROPERTY_NAME
})
+@javax.annotation.concurrent.Immutable
public class AdditionalPropertiesBoolean extends HashMap {
public static final String JSON_PROPERTY_NAME = "name";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
index 781d4686e98..e35f2cca9ab 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
@@ -43,6 +43,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2,
AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3
})
+@javax.annotation.concurrent.Immutable
public class AdditionalPropertiesClass {
public static final String JSON_PROPERTY_MAP_STRING = "map_string";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
index 2426e7c974c..c3241fbab3d 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
@@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
AdditionalPropertiesInteger.JSON_PROPERTY_NAME
})
+@javax.annotation.concurrent.Immutable
public class AdditionalPropertiesInteger extends HashMap {
public static final String JSON_PROPERTY_NAME = "name";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
index da407ccdc47..2e4c40ce549 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
@@ -32,6 +32,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
AdditionalPropertiesNumber.JSON_PROPERTY_NAME
})
+@javax.annotation.concurrent.Immutable
public class AdditionalPropertiesNumber extends HashMap {
public static final String JSON_PROPERTY_NAME = "name";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
index 5e468870311..ac8cd6cf152 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
@@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
AdditionalPropertiesObject.JSON_PROPERTY_NAME
})
+@javax.annotation.concurrent.Immutable
public class AdditionalPropertiesObject extends HashMap {
public static final String JSON_PROPERTY_NAME = "name";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
index ed080254966..94b3707ee95 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
@@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
AdditionalPropertiesString.JSON_PROPERTY_NAME
})
+@javax.annotation.concurrent.Immutable
public class AdditionalPropertiesString extends HashMap {
public static final String JSON_PROPERTY_NAME = "name";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java
index ff1d1f941ae..845a10ecb10 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java
@@ -32,6 +32,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
Animal.JSON_PROPERTY_CLASS_NAME,
Animal.JSON_PROPERTY_COLOR
})
+@javax.annotation.concurrent.Immutable
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
@JsonSubTypes({
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
index 96f829bc648..d2b96d3910a 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
@@ -32,6 +32,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
ArrayOfArrayOfNumberOnly.JSON_PROPERTY_ARRAY_ARRAY_NUMBER
})
+@javax.annotation.concurrent.Immutable
public class ArrayOfArrayOfNumberOnly {
public static final String JSON_PROPERTY_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
index 37e40dbd3ec..c4ad3fd608d 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
@@ -32,6 +32,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
ArrayOfNumberOnly.JSON_PROPERTY_ARRAY_NUMBER
})
+@javax.annotation.concurrent.Immutable
public class ArrayOfNumberOnly {
public static final String JSON_PROPERTY_ARRAY_NUMBER = "ArrayNumber";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayTest.java
index de7c895ac93..c650f156e57 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayTest.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayTest.java
@@ -34,6 +34,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER,
ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL
})
+@javax.annotation.concurrent.Immutable
public class ArrayTest {
public static final String JSON_PROPERTY_ARRAY_OF_STRING = "array_of_string";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Capitalization.java
index 033e9788110..20050a23c00 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Capitalization.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Capitalization.java
@@ -34,6 +34,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
Capitalization.JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS,
Capitalization.JSON_PROPERTY_A_T_T_N_A_M_E
})
+@javax.annotation.concurrent.Immutable
public class Capitalization {
public static final String JSON_PROPERTY_SMALL_CAMEL = "smallCamel";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java
index 569d7d08d59..80b4560effc 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java
@@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
Cat.JSON_PROPERTY_DECLAWED
})
+@javax.annotation.concurrent.Immutable
public class Cat extends Animal {
public static final String JSON_PROPERTY_DECLAWED = "declawed";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java
index cc04e0e022d..a1c88ddb120 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java
@@ -29,6 +29,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
CatAllOf.JSON_PROPERTY_DECLAWED
})
+@javax.annotation.concurrent.Immutable
public class CatAllOf {
public static final String JSON_PROPERTY_DECLAWED = "declawed";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Category.java
index 868ba875074..e351a7841bb 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Category.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Category.java
@@ -30,6 +30,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
Category.JSON_PROPERTY_ID,
Category.JSON_PROPERTY_NAME
})
+@javax.annotation.concurrent.Immutable
public class Category {
public static final String JSON_PROPERTY_ID = "id";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ClassModel.java
index 4de7664b26a..01403deddd8 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ClassModel.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ClassModel.java
@@ -30,6 +30,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
ClassModel.JSON_PROPERTY_PROPERTY_CLASS
})
+@javax.annotation.concurrent.Immutable
public class ClassModel {
public static final String JSON_PROPERTY_PROPERTY_CLASS = "_class";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Client.java
index 02b0aac2247..6cd245b2f72 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Client.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Client.java
@@ -29,6 +29,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
Client.JSON_PROPERTY_CLIENT
})
+@javax.annotation.concurrent.Immutable
public class Client {
public static final String JSON_PROPERTY_CLIENT = "client";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java
index 78044654d50..fd9ac0975c6 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java
@@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
Dog.JSON_PROPERTY_BREED
})
+@javax.annotation.concurrent.Immutable
public class Dog extends Animal {
public static final String JSON_PROPERTY_BREED = "breed";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java
index dd42595cf20..57942316357 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java
@@ -29,6 +29,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
DogAllOf.JSON_PROPERTY_BREED
})
+@javax.annotation.concurrent.Immutable
public class DogAllOf {
public static final String JSON_PROPERTY_BREED = "breed";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumArrays.java
index aff182cd498..5585af2f9c2 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumArrays.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumArrays.java
@@ -32,6 +32,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
EnumArrays.JSON_PROPERTY_JUST_SYMBOL,
EnumArrays.JSON_PROPERTY_ARRAY_ENUM
})
+@javax.annotation.concurrent.Immutable
public class EnumArrays {
/**
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java
index 51a1a645a10..ca72f8b9012 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java
@@ -34,6 +34,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
EnumTest.JSON_PROPERTY_ENUM_NUMBER,
EnumTest.JSON_PROPERTY_OUTER_ENUM
})
+@javax.annotation.concurrent.Immutable
public class EnumTest {
/**
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
index 8166597792d..d1793a655e0 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
@@ -32,6 +32,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
FileSchemaTestClass.JSON_PROPERTY_FILE,
FileSchemaTestClass.JSON_PROPERTY_FILES
})
+@javax.annotation.concurrent.Immutable
public class FileSchemaTestClass {
public static final String JSON_PROPERTY_FILE = "file";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java
index 4dee7f6c9dc..20939e85f8b 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java
@@ -47,6 +47,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
FormatTest.JSON_PROPERTY_PASSWORD,
FormatTest.JSON_PROPERTY_BIG_DECIMAL
})
+@javax.annotation.concurrent.Immutable
public class FormatTest {
public static final String JSON_PROPERTY_INTEGER = "integer";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
index 0a3f0d46436..43e9ddd65f6 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
@@ -30,6 +30,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
HasOnlyReadOnly.JSON_PROPERTY_BAR,
HasOnlyReadOnly.JSON_PROPERTY_FOO
})
+@javax.annotation.concurrent.Immutable
public class HasOnlyReadOnly {
public static final String JSON_PROPERTY_BAR = "bar";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java
index 113f92dd9cb..62492374cca 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java
@@ -35,6 +35,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
MapTest.JSON_PROPERTY_DIRECT_MAP,
MapTest.JSON_PROPERTY_INDIRECT_MAP
})
+@javax.annotation.concurrent.Immutable
public class MapTest {
public static final String JSON_PROPERTY_MAP_MAP_OF_STRING = "map_map_of_string";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
index d483d69700f..205ba6040a9 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
@@ -37,6 +37,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_DATE_TIME,
MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_MAP
})
+@javax.annotation.concurrent.Immutable
public class MixedPropertiesAndAdditionalPropertiesClass {
public static final String JSON_PROPERTY_UUID = "uuid";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Model200Response.java
index dd99468a005..5d4a6f98461 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Model200Response.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Model200Response.java
@@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
Model200Response.JSON_PROPERTY_NAME,
Model200Response.JSON_PROPERTY_PROPERTY_CLASS
})
+@javax.annotation.concurrent.Immutable
public class Model200Response {
public static final String JSON_PROPERTY_NAME = "name";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelApiResponse.java
index 383cafdd3a5..d6acae129e4 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelApiResponse.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelApiResponse.java
@@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
ModelApiResponse.JSON_PROPERTY_TYPE,
ModelApiResponse.JSON_PROPERTY_MESSAGE
})
+@javax.annotation.concurrent.Immutable
public class ModelApiResponse {
public static final String JSON_PROPERTY_CODE = "code";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelReturn.java
index b62e13a90a0..9b51c8944a4 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelReturn.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelReturn.java
@@ -30,6 +30,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
ModelReturn.JSON_PROPERTY_RETURN
})
+@javax.annotation.concurrent.Immutable
public class ModelReturn {
public static final String JSON_PROPERTY_RETURN = "return";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Name.java
index bd625c5f66f..811858d4a84 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Name.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Name.java
@@ -33,6 +33,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
Name.JSON_PROPERTY_PROPERTY,
Name.JSON_PROPERTY_123NUMBER
})
+@javax.annotation.concurrent.Immutable
public class Name {
public static final String JSON_PROPERTY_NAME = "name";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NumberOnly.java
index 5ca72a169fe..7e27fe83b1c 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NumberOnly.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NumberOnly.java
@@ -30,6 +30,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
NumberOnly.JSON_PROPERTY_JUST_NUMBER
})
+@javax.annotation.concurrent.Immutable
public class NumberOnly {
public static final String JSON_PROPERTY_JUST_NUMBER = "JustNumber";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Order.java
index d4f5f1c55bd..aa3d4a98d0c 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Order.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Order.java
@@ -35,6 +35,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
Order.JSON_PROPERTY_STATUS,
Order.JSON_PROPERTY_COMPLETE
})
+@javax.annotation.concurrent.Immutable
public class Order {
public static final String JSON_PROPERTY_ID = "id";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java
index 4d73ff2bbd6..89b5ed48f3b 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java
@@ -32,6 +32,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
OuterComposite.JSON_PROPERTY_MY_STRING,
OuterComposite.JSON_PROPERTY_MY_BOOLEAN
})
+@javax.annotation.concurrent.Immutable
public class OuterComposite {
public static final String JSON_PROPERTY_MY_NUMBER = "my_number";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Pet.java
index be74dd5ca08..874476d41a3 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Pet.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Pet.java
@@ -38,6 +38,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
Pet.JSON_PROPERTY_TAGS,
Pet.JSON_PROPERTY_STATUS
})
+@javax.annotation.concurrent.Immutable
public class Pet {
public static final String JSON_PROPERTY_ID = "id";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
index b3e58ef3d2c..1cee03d06c3 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
@@ -30,6 +30,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
ReadOnlyFirst.JSON_PROPERTY_BAR,
ReadOnlyFirst.JSON_PROPERTY_BAZ
})
+@javax.annotation.concurrent.Immutable
public class ReadOnlyFirst {
public static final String JSON_PROPERTY_BAR = "bar";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SpecialModelName.java
index 35ad3bf4699..453c8ad9b99 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SpecialModelName.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SpecialModelName.java
@@ -29,6 +29,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
SpecialModelName.JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME
})
+@javax.annotation.concurrent.Immutable
public class SpecialModelName {
public static final String JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME = "$special[property.name]";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Tag.java
index a3ecb398faa..a7c2f4cafe2 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Tag.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Tag.java
@@ -30,6 +30,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
Tag.JSON_PROPERTY_ID,
Tag.JSON_PROPERTY_NAME
})
+@javax.annotation.concurrent.Immutable
public class Tag {
public static final String JSON_PROPERTY_ID = "id";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderDefault.java
index e5996f69468..f5a3d19c0a9 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderDefault.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderDefault.java
@@ -36,6 +36,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
TypeHolderDefault.JSON_PROPERTY_BOOL_ITEM,
TypeHolderDefault.JSON_PROPERTY_ARRAY_ITEM
})
+@javax.annotation.concurrent.Immutable
public class TypeHolderDefault {
public static final String JSON_PROPERTY_STRING_ITEM = "string_item";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderExample.java
index b7f141913e7..d00f5441862 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderExample.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderExample.java
@@ -37,6 +37,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
TypeHolderExample.JSON_PROPERTY_BOOL_ITEM,
TypeHolderExample.JSON_PROPERTY_ARRAY_ITEM
})
+@javax.annotation.concurrent.Immutable
public class TypeHolderExample {
public static final String JSON_PROPERTY_STRING_ITEM = "string_item";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/User.java
index b7e74643dab..f83fb1e6718 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/User.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/User.java
@@ -36,6 +36,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
User.JSON_PROPERTY_PHONE,
User.JSON_PROPERTY_USER_STATUS
})
+@javax.annotation.concurrent.Immutable
public class User {
public static final String JSON_PROPERTY_ID = "id";
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/XmlItem.java
index 65e7c295192..22d7ad37054 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/XmlItem.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/XmlItem.java
@@ -60,6 +60,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
XmlItem.JSON_PROPERTY_PREFIX_NS_ARRAY,
XmlItem.JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY
})
+@javax.annotation.concurrent.Immutable
public class XmlItem {
public static final String JSON_PROPERTY_ATTRIBUTE_STRING = "attribute_string";