Skip to content

Commit 7653c18

Browse files
committed
Merge remote-tracking branch 'origin/java-generic-okhttp' into java-generic-okhttp
2 parents 8537d4f + f1fcc3f commit 7653c18

236 files changed

Lines changed: 8675 additions & 525 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java‎

Lines changed: 57 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ protected enum ENUM_PROPERTY_NAMING_TYPE {MACRO_CASE, legacy, original}
225225
@Setter
226226
protected boolean useJspecify;
227227
protected JSpecifyNullableLambda jSpecifyNullableLambda;
228+
protected RemoveAnnotationLambda removeAnnotationLambda;
229+
228230
@Getter @Setter
229231
protected boolean useDeductionForOneOfInterfaces = false;
230232

@@ -706,9 +708,8 @@ public void processOpts() {
706708
}
707709
writer.write(content);
708710
});
709-
additionalProperties.put("removeAnnotations", (Mustache.Lambda) (fragment, writer) -> {
710-
writer.write(removeAnnotations(fragment.execute()));
711-
});
711+
this.removeAnnotationLambda = new RemoveAnnotationLambda();
712+
additionalProperties.put("removeAnnotations", removeAnnotationLambda);
712713
additionalProperties.put("sanitizeDataType", (Mustache.Lambda) (fragment, writer) -> {
713714
writer.write(sanitizeDataType(fragment.execute()));
714715
});
@@ -881,6 +882,8 @@ protected void applyJspecify() {
881882
(sourceFolder + File.separator + apiPackage).replace(".", java.io.File.separator),
882883
"package-info.java"));
883884
}
885+
// simplify mustache template for jspecify. @Nullable is kept
886+
this.removeAnnotationLambda.keepAnnotation("@Nullable");
884887
}
885888

886889
@Override
@@ -2076,6 +2079,7 @@ public void postProcessResponseWithProperty(CodegenResponse response, CodegenPro
20762079
* <p>
20772080
* For example:
20782081
* <ul>
2082+
* <li>{@code @jakarta.annotation.Nullable String} -> {@code String}</li>
20792083
* <li>{@code @Min(0) @Max(10)Integer} -> {@code Integer}</li>
20802084
* <li>{@code @Pattern(regexp = "^[a-z]$")String>} -> {@code String}</li>
20812085
* <li>{@code List<@Pattern(regexp = "^[a-z]$")String>}" -> "{@code List<String>}"</li>
@@ -2087,7 +2091,38 @@ public void postProcessResponseWithProperty(CodegenResponse response, CodegenPro
20872091
*/
20882092
public String removeAnnotations(String dataType) {
20892093
if (dataType != null && dataType.contains("@")) {
2090-
return dataType.replaceAll("(?:(?i)@[a-z0-9]*+([(].*[)]|\\s*))*+", "");
2094+
return dataType.replaceAll("(?:(?i)@[a-z0-9\\.]*+([(].*[)]|\\s*))*+", "");
2095+
}
2096+
return dataType;
2097+
}
2098+
2099+
/**
2100+
* Remove annotations from the given data type string except annotationToKeep.
2101+
* <p>
2102+
* For example:
2103+
* <ul>
2104+
* <li>{@code @Nullable @Min(0) @Max(10)Integer} -> {@code @Nullable Integer}</li>
2105+
* <li>{@code @Nullable List<@Valid Pet>}" -> "{@code @Nullable List<Pet>}"</li>
2106+
* </ul>
2107+
*
2108+
* @param dataType the data type string
2109+
* @param annotationToKeep annotation to keep. For example @Nullable
2110+
* @return the data type string without annotations.
2111+
*/
2112+
public String removeAnnotationsWithExclusion(String dataType, String annotationToKeep) {
2113+
if (dataType != null && dataType.contains("@")) {
2114+
if (annotationToKeep == null) {
2115+
return dataType.replaceAll("(?:(?i)@[a-z0-9\\.]*+([(].*[)]|\\s*))*+", "");
2116+
}
2117+
annotationToKeep += " ";
2118+
boolean annotationPresent = dataType.indexOf(annotationToKeep) >=0;
2119+
if (annotationPresent) {
2120+
dataType = dataType.replace( annotationToKeep, "%%");
2121+
}
2122+
dataType = dataType.replaceAll("(?:(?i)@[a-z0-9\\.]*+([(].*[)]|\\s*))*+", "");
2123+
if (annotationPresent) {
2124+
dataType = dataType.replace("%%", annotationToKeep);
2125+
}
20912126
}
20922127
return dataType;
20932128
}
@@ -2876,7 +2911,7 @@ private int getLastIndex(String dataType) {
28762911
/**
28772912
* for Jspecify, remove @Nullable before the datatype and set keptNullable to true if done.
28782913
*/
2879-
class JSpecifyNullableLambda implements Mustache.Lambda {
2914+
protected class JSpecifyNullableLambda implements Mustache.Lambda {
28802915
private String nullableAnnotation = "@Nullable";
28812916
// remember @Nullable annotation value when jspecify is used.
28822917
private String keptNullable = null;
@@ -2926,4 +2961,21 @@ protected void addNullableImportForOperation(CodegenOperation codegenOperation)
29262961
.findAny()
29272962
.ifPresent(param -> codegenOperation.imports.add("Nullable"));
29282963
}
2964+
2965+
/**
2966+
* Simplify the removeAnnotations lambda for custom removal.
2967+
*/
2968+
protected class RemoveAnnotationLambda implements Mustache.Lambda {
2969+
2970+
private String keep;
2971+
2972+
@Override
2973+
public void execute(Template.Fragment fragment, Writer writer) throws IOException {
2974+
writer.write(removeAnnotationsWithExclusion(fragment.execute(), keep));
2975+
}
2976+
2977+
public void keepAnnotation(String keep) {
2978+
this.keep = keep;
2979+
}
2980+
}
29292981
}

‎modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
package org.openapitools.codegen.languages;
1919

20+
import com.samskivert.mustache.Mustache;
2021
import io.swagger.v3.oas.models.Operation;
2122
import io.swagger.v3.oas.models.media.Schema;
2223
import io.swagger.v3.oas.models.servers.Server;
@@ -1448,8 +1449,9 @@ protected void applyJspecify() {
14481449
(sourceFolder + File.separator + invokerPackage).replace(".", java.io.File.separator),
14491450
"package-info.java"));
14501451
}
1452+
String nullableAnnotation = "@" + additionalProperties.get(JAVAX_PACKAGE) + ".annotation.Nullable";
14511453
// nullable_var_annotations.mustache generates nullable annotations as @{{javaxPackage}}.annotation.Nullable
14521454
// override the default pattern for the "find and replace"
1453-
jSpecifyNullableLambda.setNullableAnnotation("@" + additionalProperties.get(JAVAX_PACKAGE) + ".annotation.Nullable");
1455+
jSpecifyNullableLambda.setNullableAnnotation(nullableAnnotation);
14541456
}
14551457
}

‎modules/openapi-generator/src/main/resources/Java/libraries/feign/pojo.mustache‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
125125

126126
public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) {
127127
{{#vendorExtensions.x-is-jackson-optional-nullable}}
128-
if (this.{{name}} == null || !this.{{name}}.isPresent()) {
128+
if (this.{{name}} == null || !this.{{name}}.isPresent() || this.{{name}}.get() == null) {
129129
this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}});
130130
}
131131
try {
@@ -148,7 +148,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
148148

149149
public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) {
150150
{{#vendorExtensions.x-is-jackson-optional-nullable}}
151-
if (this.{{name}} == null || !this.{{name}}.isPresent()) {
151+
if (this.{{name}} == null || !this.{{name}}.isPresent() || this.{{name}}.get() == null) {
152152
this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}});
153153
}
154154
try {

‎modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pojo.mustache‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
135135

136136
public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) {
137137
{{#vendorExtensions.x-is-jackson-optional-nullable}}
138-
if (this.{{name}} == null || !this.{{name}}.isPresent()) {
138+
if (this.{{name}} == null || !this.{{name}}.isPresent() || this.{{name}}.get() == null) {
139139
this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}});
140140
}
141141
try {
@@ -158,7 +158,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
158158

159159
public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) {
160160
{{#vendorExtensions.x-is-jackson-optional-nullable}}
161-
if (this.{{name}} == null || !this.{{name}}.isPresent()) {
161+
if (this.{{name}} == null || !this.{{name}}.isPresent() || this.{{name}}.get() == null) {
162162
this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}});
163163
}
164164
try {
@@ -209,7 +209,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
209209
@ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
210210
{{/swagger1AnnotationLibrary}}
211211
{{#swagger2AnnotationLibrary}}
212-
@Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}")
212+
@Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}"{{#isNullable}}, nullable = true{{/isNullable}})
213213
{{/swagger2AnnotationLibrary}}
214214
{{#vendorExtensions.x-extra-annotation}}
215215
{{{vendorExtensions.x-extra-annotation}}}

‎modules/openapi-generator/src/main/resources/Java/libraries/jersey3/pojo.mustache‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
135135

136136
public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) {
137137
{{#vendorExtensions.x-is-jackson-optional-nullable}}
138-
if (this.{{name}} == null || !this.{{name}}.isPresent()) {
138+
if (this.{{name}} == null || !this.{{name}}.isPresent() || this.{{name}}.get() == null) {
139139
this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}});
140140
}
141141
try {
@@ -158,7 +158,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
158158

159159
public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) {
160160
{{#vendorExtensions.x-is-jackson-optional-nullable}}
161-
if (this.{{name}} == null || !this.{{name}}.isPresent()) {
161+
if (this.{{name}} == null || !this.{{name}}.isPresent() || this.{{name}}.get() == null) {
162162
this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}});
163163
}
164164
try {
@@ -209,7 +209,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
209209
@ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
210210
{{/swagger1AnnotationLibrary}}
211211
{{#swagger2AnnotationLibrary}}
212-
@Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}")
212+
@Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}"{{#isNullable}}, nullable = true{{/isNullable}})
213213
{{/swagger2AnnotationLibrary}}
214214
{{#vendorExtensions.x-extra-annotation}}
215215
{{{vendorExtensions.x-extra-annotation}}}

‎modules/openapi-generator/src/main/resources/Java/libraries/native/pojo.mustache‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
126126

127127
public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) {
128128
{{#vendorExtensions.x-is-jackson-optional-nullable}}
129-
if (this.{{name}} == null || !this.{{name}}.isPresent()) {
129+
if (this.{{name}} == null || !this.{{name}}.isPresent() || this.{{name}}.get() == null) {
130130
this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}});
131131
}
132132
try {
@@ -149,7 +149,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
149149

150150
public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) {
151151
{{#vendorExtensions.x-is-jackson-optional-nullable}}
152-
if (this.{{name}} == null || !this.{{name}}.isPresent()) {
152+
if (this.{{name}} == null || !this.{{name}}.isPresent() || this.{{name}}.get() == null) {
153153
this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}});
154154
}
155155
try {
@@ -200,7 +200,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
200200
@ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
201201
{{/swagger1AnnotationLibrary}}
202202
{{#swagger2AnnotationLibrary}}
203-
@Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}")
203+
@Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}"{{#isNullable}}, nullable = true{{/isNullable}})
204204
{{/swagger2AnnotationLibrary}}
205205
{{#vendorExtensions.x-extra-annotation}}
206206
{{{vendorExtensions.x-extra-annotation}}}

‎modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pojo.mustache‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
171171
@ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
172172
{{/swagger1AnnotationLibrary}}
173173
{{#swagger2AnnotationLibrary}}
174-
@Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}")
174+
@Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}"{{#isNullable}}, nullable = true{{/isNullable}})
175175
{{/swagger2AnnotationLibrary}}
176176
{{#vendorExtensions.x-extra-annotation}}
177177
{{{vendorExtensions.x-extra-annotation}}}

‎modules/openapi-generator/src/main/resources/Java/libraries/restclient/pojo.mustache‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public {{>sealed}}class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#v
151151

152152
public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) {
153153
{{#vendorExtensions.x-is-jackson-optional-nullable}}
154-
if (this.{{name}} == null || !this.{{name}}.isPresent()) {
154+
if (this.{{name}} == null || !this.{{name}}.isPresent() || this.{{name}}.get() == null) {
155155
this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}});
156156
}
157157
try {
@@ -174,7 +174,7 @@ public {{>sealed}}class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#v
174174

175175
public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) {
176176
{{#vendorExtensions.x-is-jackson-optional-nullable}}
177-
if (this.{{name}} == null || !this.{{name}}.isPresent()) {
177+
if (this.{{name}} == null || !this.{{name}}.isPresent() || this.{{name}}.get() == null) {
178178
this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}});
179179
}
180180
try {
@@ -230,7 +230,7 @@ public {{>sealed}}class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#v
230230
@ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
231231
{{/swagger1AnnotationLibrary}}
232232
{{#swagger2AnnotationLibrary}}
233-
@Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}")
233+
@Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}"{{#isNullable}}, nullable = true{{/isNullable}})
234234
{{/swagger2AnnotationLibrary}}
235235
{{#vendorExtensions.x-extra-annotation}}
236236
{{{vendorExtensions.x-extra-annotation}}}

‎modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pojo.mustache‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
151151

152152
public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) {
153153
{{#vendorExtensions.x-is-jackson-optional-nullable}}
154-
if (this.{{name}} == null || !this.{{name}}.isPresent()) {
154+
if (this.{{name}} == null || !this.{{name}}.isPresent() || this.{{name}}.get() == null) {
155155
this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}});
156156
}
157157
try {
@@ -174,7 +174,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
174174

175175
public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) {
176176
{{#vendorExtensions.x-is-jackson-optional-nullable}}
177-
if (this.{{name}} == null || !this.{{name}}.isPresent()) {
177+
if (this.{{name}} == null || !this.{{name}}.isPresent() || this.{{name}}.get() == null) {
178178
this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}});
179179
}
180180
try {
@@ -230,7 +230,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
230230
@ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
231231
{{/swagger1AnnotationLibrary}}
232232
{{#swagger2AnnotationLibrary}}
233-
@Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}")
233+
@Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}"{{#isNullable}}, nullable = true{{/isNullable}})
234234
{{/swagger2AnnotationLibrary}}
235235
{{#vendorExtensions.x-extra-annotation}}
236236
{{{vendorExtensions.x-extra-annotation}}}

0 commit comments

Comments
 (0)