forked from loafle/openapi-generator-original
[JAVA] Jersey3 deprecate class attribute (#17223)
* Deprecate attribute * Generate samples
This commit is contained in:
parent
77127ecf65
commit
4a1db3f1e6
@ -80,13 +80,22 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
{{#vendorExtensions.x-is-jackson-optional-nullable}}
|
||||
{{#isContainer}}
|
||||
{{#deprecated}}
|
||||
@Deprecated
|
||||
{{/deprecated}}
|
||||
private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined();
|
||||
{{/isContainer}}
|
||||
{{^isContainer}}
|
||||
{{#deprecated}}
|
||||
@Deprecated
|
||||
{{/deprecated}}
|
||||
private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}};
|
||||
{{/isContainer}}
|
||||
{{/vendorExtensions.x-is-jackson-optional-nullable}}
|
||||
{{^vendorExtensions.x-is-jackson-optional-nullable}}
|
||||
{{#deprecated}}
|
||||
@Deprecated
|
||||
{{/deprecated}}
|
||||
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
|
||||
{{/vendorExtensions.x-is-jackson-optional-nullable}}
|
||||
|
||||
|
@ -45,12 +45,15 @@ public class ObjectWithDeprecatedFields {
|
||||
private String uuid;
|
||||
|
||||
public static final String JSON_PROPERTY_ID = "id";
|
||||
@Deprecated
|
||||
private BigDecimal id;
|
||||
|
||||
public static final String JSON_PROPERTY_DEPRECATED_REF = "deprecatedRef";
|
||||
@Deprecated
|
||||
private DeprecatedObject deprecatedRef;
|
||||
|
||||
public static final String JSON_PROPERTY_BARS = "bars";
|
||||
@Deprecated
|
||||
private List<String> bars;
|
||||
|
||||
public ObjectWithDeprecatedFields() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user