forked from loafle/openapi-generator-original
[Spring] Resolve default value issue with Lombok Builder (#19855)
* merge PR 18690 * update samples
This commit is contained in:
parent
9fcbdb95d9
commit
d30220b8df
@ -66,6 +66,11 @@ public class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}{{^parent}}
|
|||||||
{{#vendorExtensions.x-field-extra-annotation}}
|
{{#vendorExtensions.x-field-extra-annotation}}
|
||||||
{{{vendorExtensions.x-field-extra-annotation}}}
|
{{{vendorExtensions.x-field-extra-annotation}}}
|
||||||
{{/vendorExtensions.x-field-extra-annotation}}
|
{{/vendorExtensions.x-field-extra-annotation}}
|
||||||
|
{{#lombok.Builder}}
|
||||||
|
{{#defaultValue}}
|
||||||
|
@lombok.Builder.Default
|
||||||
|
{{/defaultValue}}
|
||||||
|
{{/lombok.Builder}}
|
||||||
{{#deprecated}}
|
{{#deprecated}}
|
||||||
@Deprecated
|
@Deprecated
|
||||||
{{/deprecated}}
|
{{/deprecated}}
|
||||||
|
@ -78,6 +78,7 @@ public class Order {
|
|||||||
|
|
||||||
private @Nullable StatusEnum status;
|
private @Nullable StatusEnum status;
|
||||||
|
|
||||||
|
@lombok.Builder.Default
|
||||||
private Boolean complete = false;
|
private Boolean complete = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -39,9 +39,11 @@ public class Pet {
|
|||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@lombok.Builder.Default
|
||||||
@Valid
|
@Valid
|
||||||
private List<String> photoUrls = new ArrayList<>();
|
private List<String> photoUrls = new ArrayList<>();
|
||||||
|
|
||||||
|
@lombok.Builder.Default
|
||||||
@Valid
|
@Valid
|
||||||
private List<@Valid Tag> tags = new ArrayList<>();
|
private List<@Valid Tag> tags = new ArrayList<>();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user