mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-06 02:25:20 +00:00
parent
663ee66068
commit
ba3af50384
@ -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
|
||||
|
@ -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%
|
||||
|
@ -34,6 +34,7 @@ sidebar_label: groovy
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|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|
|
||||
|
@ -36,6 +36,7 @@ sidebar_label: java-inflector
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|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|
|
||||
|
@ -36,6 +36,7 @@ sidebar_label: java-msf4j
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|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|
|
||||
|
@ -36,6 +36,7 @@ sidebar_label: java-pkmst
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|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|
|
||||
|
@ -36,6 +36,7 @@ sidebar_label: java-play-framework
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|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|
|
||||
|
@ -36,6 +36,7 @@ sidebar_label: java-undertow-server
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|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|
|
||||
|
@ -36,6 +36,7 @@ sidebar_label: java-vertx-web
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|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|
|
||||
|
@ -36,6 +36,7 @@ sidebar_label: java-vertx
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|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|
|
||||
|
@ -36,6 +36,7 @@ sidebar_label: java
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|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|
|
||||
|
@ -36,6 +36,7 @@ sidebar_label: jaxrs-cxf-cdi
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|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|
|
||||
|
@ -36,6 +36,7 @@ sidebar_label: jaxrs-cxf-client
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|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|
|
||||
|
@ -36,6 +36,7 @@ sidebar_label: jaxrs-cxf-extended
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|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|
|
||||
|
@ -36,6 +36,7 @@ sidebar_label: jaxrs-cxf
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|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|
|
||||
|
@ -36,6 +36,7 @@ sidebar_label: jaxrs-jersey
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|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|
|
||||
|
@ -36,6 +36,7 @@ sidebar_label: jaxrs-resteasy-eap
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|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|
|
||||
|
@ -36,6 +36,7 @@ sidebar_label: jaxrs-resteasy
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|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|
|
||||
|
@ -36,6 +36,7 @@ sidebar_label: jaxrs-spec
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|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|
|
||||
|
@ -36,6 +36,7 @@ sidebar_label: spring
|
||||
|java8|Option. Use Java8 classes instead of third party equivalents|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64. Use java8 default interface when a responseWrapper is used</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd><dl>|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|
|
||||
|
@ -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<String> 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<String, Object> postProcessAllModels(Map<String, Object> objs) {
|
||||
objs = super.updateAllModels(objs);
|
||||
|
||||
if (!additionalModelTypeAnnotations.isEmpty()) {
|
||||
for (String modelName : objs.keySet()) {
|
||||
Map<String, Object> models = (Map<String, Object>) 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<String> additionalModelTypeAnnotations) {
|
||||
this.additionalModelTypeAnnotations = additionalModelTypeAnnotations;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) {
|
||||
super.addAdditionPropertiesToCodeGenModel(codegenModel, schema);
|
||||
|
2
modules/openapi-generator/src/main/resources/Java/additionalModelTypeAnnotations.mustache
vendored
Normal file
2
modules/openapi-generator/src/main/resources/Java/additionalModelTypeAnnotations.mustache
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
{{#additionalModelTypeAnnotations}}{{.}}
|
||||
{{/additionalModelTypeAnnotations}}
|
@ -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;
|
||||
|
@ -0,0 +1,2 @@
|
||||
{{#additionalModelTypeAnnotations}}{{.}}
|
||||
{{/additionalModelTypeAnnotations}}
|
@ -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}}
|
||||
|
@ -0,0 +1,2 @@
|
||||
{{#additionalModelTypeAnnotations}}{{.}}
|
||||
{{/additionalModelTypeAnnotations}}
|
@ -0,0 +1,2 @@
|
||||
{{#additionalModelTypeAnnotations}}{{.}}
|
||||
{{/additionalModelTypeAnnotations}}
|
@ -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}}
|
||||
|
||||
|
@ -0,0 +1,2 @@
|
||||
{{#additionalModelTypeAnnotations}}{{.}}
|
||||
{{/additionalModelTypeAnnotations}}
|
@ -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}}
|
||||
|
@ -0,0 +1,2 @@
|
||||
{{#additionalModelTypeAnnotations}}{{.}}
|
||||
{{/additionalModelTypeAnnotations}}
|
@ -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}}
|
||||
|
@ -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}}
|
||||
|
@ -0,0 +1,2 @@
|
||||
{{#additionalModelTypeAnnotations}}{{.}}
|
||||
{{/additionalModelTypeAnnotations}}
|
@ -0,0 +1,2 @@
|
||||
{{#additionalModelTypeAnnotations}}{{.}}
|
||||
{{/additionalModelTypeAnnotations}}
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -0,0 +1,2 @@
|
||||
{{#additionalModelTypeAnnotations}}{{.}}
|
||||
{{/additionalModelTypeAnnotations}}
|
@ -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}}
|
||||
|
||||
|
@ -0,0 +1,2 @@
|
||||
{{#additionalModelTypeAnnotations}}{{.}}
|
||||
{{/additionalModelTypeAnnotations}}
|
@ -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}}
|
||||
|
@ -0,0 +1,2 @@
|
||||
{{#additionalModelTypeAnnotations}}{{.}}
|
||||
{{/additionalModelTypeAnnotations}}
|
@ -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;
|
||||
|
@ -0,0 +1,2 @@
|
||||
{{#additionalModelTypeAnnotations}}{{.}}
|
||||
{{/additionalModelTypeAnnotations}}
|
@ -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}}
|
||||
|
||||
|
@ -0,0 +1,2 @@
|
||||
{{#additionalModelTypeAnnotations}}{{.}}
|
||||
{{/additionalModelTypeAnnotations}}
|
@ -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}}
|
||||
|
||||
|
2
modules/openapi-generator/src/main/resources/apex/additionalModelTypeAnnotations.mustache
vendored
Normal file
2
modules/openapi-generator/src/main/resources/apex/additionalModelTypeAnnotations.mustache
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
{{#additionalModelTypeAnnotations}}{{.}}
|
||||
{{/additionalModelTypeAnnotations}}
|
@ -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}}
|
||||
|
@ -0,0 +1,2 @@
|
||||
{{#additionalModelTypeAnnotations}}{{.}}
|
||||
{{/additionalModelTypeAnnotations}}
|
@ -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}}
|
||||
|
@ -0,0 +1,2 @@
|
||||
{{#additionalModelTypeAnnotations}}{{.}}
|
||||
{{/additionalModelTypeAnnotations}}
|
@ -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;
|
||||
|
@ -0,0 +1,2 @@
|
||||
{{#additionalModelTypeAnnotations}}{{.}}
|
||||
{{/additionalModelTypeAnnotations}}
|
@ -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}}
|
||||
|
||||
|
@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
@JsonPropertyOrder({
|
||||
AdditionalPropertiesAnyType.JSON_PROPERTY_NAME
|
||||
})
|
||||
@javax.annotation.concurrent.Immutable
|
||||
|
||||
public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
|
@ -32,6 +32,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
@JsonPropertyOrder({
|
||||
AdditionalPropertiesArray.JSON_PROPERTY_NAME
|
||||
})
|
||||
@javax.annotation.concurrent.Immutable
|
||||
|
||||
public class AdditionalPropertiesArray extends HashMap<String, List> {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
|
@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
@JsonPropertyOrder({
|
||||
AdditionalPropertiesBoolean.JSON_PROPERTY_NAME
|
||||
})
|
||||
@javax.annotation.concurrent.Immutable
|
||||
|
||||
public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
|
@ -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";
|
||||
|
@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
@JsonPropertyOrder({
|
||||
AdditionalPropertiesInteger.JSON_PROPERTY_NAME
|
||||
})
|
||||
@javax.annotation.concurrent.Immutable
|
||||
|
||||
public class AdditionalPropertiesInteger extends HashMap<String, Integer> {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
|
@ -32,6 +32,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
@JsonPropertyOrder({
|
||||
AdditionalPropertiesNumber.JSON_PROPERTY_NAME
|
||||
})
|
||||
@javax.annotation.concurrent.Immutable
|
||||
|
||||
public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
|
@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
@JsonPropertyOrder({
|
||||
AdditionalPropertiesObject.JSON_PROPERTY_NAME
|
||||
})
|
||||
@javax.annotation.concurrent.Immutable
|
||||
|
||||
public class AdditionalPropertiesObject extends HashMap<String, Map> {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
|
@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
@JsonPropertyOrder({
|
||||
AdditionalPropertiesString.JSON_PROPERTY_NAME
|
||||
})
|
||||
@javax.annotation.concurrent.Immutable
|
||||
|
||||
public class AdditionalPropertiesString extends HashMap<String, String> {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
|
@ -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({
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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 {
|
||||
/**
|
||||
|
@ -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 {
|
||||
/**
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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]";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user