mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 12:40:53 +00:00
[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}}
|
||||
{{#lombok.Builder}}
|
||||
{{#defaultValue}}
|
||||
@lombok.Builder.Default
|
||||
{{/defaultValue}}
|
||||
{{/lombok.Builder}}
|
||||
{{#deprecated}}
|
||||
@Deprecated
|
||||
{{/deprecated}}
|
||||
|
@ -78,6 +78,7 @@ public class Order {
|
||||
|
||||
private @Nullable StatusEnum status;
|
||||
|
||||
@lombok.Builder.Default
|
||||
private Boolean complete = false;
|
||||
|
||||
}
|
||||
|
@ -39,9 +39,11 @@ public class Pet {
|
||||
|
||||
private String name;
|
||||
|
||||
@lombok.Builder.Default
|
||||
@Valid
|
||||
private List<String> photoUrls = new ArrayList<>();
|
||||
|
||||
@lombok.Builder.Default
|
||||
@Valid
|
||||
private List<@Valid Tag> tags = new ArrayList<>();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user