Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
50 changes: 25 additions & 25 deletions .github/workflows/samples-spring-jdk17.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@ name: Samples Java Spring (JDK17)
on:
push:
paths:
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
- samples/openapi3/client/petstore/spring-cloud-4-with-optional
- samples/client/petstore/spring-http-interface-springboot-4
- samples/openapi3/server/petstore/springboot-3
- samples/openapi3/server/petstore/springboot-4
- samples/server/petstore/springboot-api-response-examples
- samples/server/petstore/springboot-lombok-data
- samples/server/petstore/springboot-lombok-tostring
- samples/server/petstore/springboot-file-delegate-optional
- samples/server/petstore/springboot-petstore-with-api-response-examples
- samples/server/petstore/spring-boot-oneof-sealed
- samples/openapi3/server/petstore/spring-boot-oneof-interface
- samples/openapi3/client/petstore/spring-cloud-3-with-optional/**
- samples/openapi3/client/petstore/spring-cloud-4-with-optional/**
- samples/client/petstore/spring-http-interface-springboot-4/**
- samples/openapi3/server/petstore/springboot-3/**
- samples/openapi3/server/petstore/springboot-4/**
- samples/server/petstore/springboot-api-response-examples/**
- samples/server/petstore/springboot-lombok-data/**
- samples/server/petstore/springboot-lombok-tostring/**
- samples/server/petstore/springboot-file-delegate-optional/**
- samples/server/petstore/springboot-petstore-with-api-response-examples/**
- samples/openapi3/server/petstore/spring-boot-oneof-sealed/
- samples/openapi3/server/petstore/spring-boot-oneof-interface/**
pull_request:
paths:
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
- samples/openapi3/client/petstore/spring-cloud-4-with-optional
- samples/client/petstore/spring-http-interface-springboot-4
- samples/openapi3/server/petstore/springboot-3
- samples/openapi3/server/petstore/springboot-4
- samples/server/petstore/springboot-api-response-examples
- samples/server/petstore/springboot-lombok-data
- samples/server/petstore/springboot-lombok-tostring
- samples/server/petstore/springboot-file-delegate-optional
- samples/server/petstore/springboot-petstore-with-api-response-examples
- samples/server/petstore/spring-boot-oneof-sealed
- samples/openapi3/server/petstore/spring-boot-oneof-interface
- samples/openapi3/client/petstore/spring-cloud-3-with-optional/**
- samples/openapi3/client/petstore/spring-cloud-4-with-optional/**
- samples/client/petstore/spring-http-interface-springboot-4/**
- samples/openapi3/server/petstore/springboot-3/**
- samples/openapi3/server/petstore/springboot-4/**
- samples/server/petstore/springboot-api-response-examples/**
- samples/server/petstore/springboot-lombok-data/**
- samples/server/petstore/springboot-lombok-tostring/**
- samples/server/petstore/springboot-file-delegate-optional/**
- samples/server/petstore/springboot-petstore-with-api-response-examples/**
- samples/openapi3/server/petstore/spring-boot-oneof-sealed/**
- samples/openapi3/server/petstore/spring-boot-oneof-interface/**
jobs:
build:
name: Build Java Spring (JDK17)
Expand All @@ -49,7 +49,7 @@ jobs:
- samples/server/petstore/springboot-lombok-tostring
- samples/server/petstore/springboot-file-delegate-optional
- samples/server/petstore/springboot-petstore-with-api-response-examples
- samples/server/petstore/spring-boot-oneof-sealed
- samples/openapi3/server/petstore/spring-boot-oneof-sealed
- samples/openapi3/server/petstore/spring-boot-oneof-interface
steps:
- uses: actions/checkout@v5
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@JsonProperty("{{baseName}}")
{{#withXml}}
@JacksonXmlProperty(localName = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#isXmlAttribute}}, isAttribute = true{{/isXmlAttribute}}{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}})
{{#isContainer}}
@JacksonXmlElementWrapper({{#isXmlWrapped}}localName = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}", {{#xmlNamespace}}namespace = "{{.}}", {{/xmlNamespace}}{{/isXmlWrapped}}useWrapping = {{isXmlWrapped}})
{{/isContainer}}
{{/withXml}}
Original file line number Diff line number Diff line change
Expand Up @@ -226,25 +226,10 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}
{{#swagger1AnnotationLibrary}}
@ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}")
{{/swagger1AnnotationLibrary}}
{{#jackson}}
@JsonProperty("{{baseName}}")
{{#withXml}}
@JacksonXmlProperty(localName = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#isXmlAttribute}}, isAttribute = true{{/isXmlAttribute}}{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}})
{{#isContainer}}
@JacksonXmlElementWrapper({{#isXmlWrapped}}localName = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}", {{#xmlNamespace}}namespace = "{{.}}", {{/xmlNamespace}}{{/isXmlWrapped}}useWrapping = {{isXmlWrapped}})
{{/isContainer}}
{{/withXml}}
{{/jackson}}
{{#withXml}}
@Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}})
{{#isXmlWrapped}}
@XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}})
{{/isXmlWrapped}}
{{/withXml}}
{{#deprecated}}
@Deprecated
{{/deprecated}}
public {{>nullableAnnotation}}{{>nullableDataTypeBeanValidation}} {{getter}}() {
{{#jackson}}{{>jackson_annotations}}{{/jackson}}{{#withXml}}{{>xmlAccessorAnnotation}}{{/withXml}} public {{>nullableAnnotation}}{{>nullableDataTypeBeanValidation}} {{getter}}() {
return {{name}};
}
{{/lombok.Getter}}
Expand All @@ -261,7 +246,7 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}
{{#deprecated}}
@Deprecated
{{/deprecated}}
public void {{setter}}({{>nullableAnnotation}}{{>nullableDataType}} {{name}}) {
{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{>jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullableAnnotation}}{{>nullableDataType}} {{name}}) {
this.{{name}} = {{name}};
}
{{/lombok.Setter}}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}})
{{#isXmlWrapped}}
@XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}})
{{/isXmlWrapped}}
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public String getAtType() {
return atType;
}

@JsonProperty("@type")
public void setAtType(String atType) {
this.atType = atType;
}
Expand All @@ -88,6 +89,7 @@ public Integer getAge() {
return age;
}

@JsonProperty("age")
public void setAge(Integer age) {
this.age = age;
}
Expand All @@ -108,6 +110,7 @@ public Boolean getHappy() {
return happy;
}

@JsonProperty("happy")
public void setHappy(Boolean happy) {
this.happy = happy;
}
Expand All @@ -128,6 +131,7 @@ public BigDecimal getPrice() {
return price;
}

@JsonProperty("price")
public void setPrice(BigDecimal price) {
this.price = price;
}
Expand All @@ -148,6 +152,7 @@ public OffsetDateTime getLastFeed() {
return lastFeed;
}

@JsonProperty("lastFeed")
public void setLastFeed(OffsetDateTime lastFeed) {
this.lastFeed = lastFeed;
}
Expand All @@ -168,6 +173,7 @@ public LocalDate getDateOfBirth() {
return dateOfBirth;
}

@JsonProperty("dateOfBirth")
public void setDateOfBirth(LocalDate dateOfBirth) {
this.dateOfBirth = dateOfBirth;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public Category id(@Nullable Long id) {
return id;
}

@JsonProperty("id")
public void setId(@Nullable Long id) {
this.id = id;
}
Expand All @@ -63,6 +64,7 @@ public Category name(@Nullable String name) {
return name;
}

@JsonProperty("name")
public void setName(@Nullable String name) {
this.name = name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public ModelApiResponse code(@Nullable Integer code) {
return code;
}

@JsonProperty("code")
public void setCode(@Nullable Integer code) {
this.code = code;
}
Expand All @@ -67,6 +68,7 @@ public ModelApiResponse type(@Nullable String type) {
return type;
}

@JsonProperty("type")
public void setType(@Nullable String type) {
this.type = type;
}
Expand All @@ -87,6 +89,7 @@ public ModelApiResponse message(@Nullable String message) {
return message;
}

@JsonProperty("message")
public void setMessage(@Nullable String message) {
this.message = message;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public Order id(@Nullable Long id) {
return id;
}

@JsonProperty("id")
public void setId(@Nullable Long id) {
this.id = id;
}
Expand All @@ -114,6 +115,7 @@ public Order petId(@Nullable Long petId) {
return petId;
}

@JsonProperty("petId")
public void setPetId(@Nullable Long petId) {
this.petId = petId;
}
Expand All @@ -134,6 +136,7 @@ public Order quantity(@Nullable Integer quantity) {
return quantity;
}

@JsonProperty("quantity")
public void setQuantity(@Nullable Integer quantity) {
this.quantity = quantity;
}
Expand All @@ -154,6 +157,7 @@ public Order shipDate(@Nullable OffsetDateTime shipDate) {
return shipDate;
}

@JsonProperty("shipDate")
public void setShipDate(@Nullable OffsetDateTime shipDate) {
this.shipDate = shipDate;
}
Expand All @@ -174,6 +178,7 @@ public Order status(@Nullable StatusEnum status) {
return status;
}

@JsonProperty("status")
public void setStatus(@Nullable StatusEnum status) {
this.status = status;
}
Expand All @@ -194,6 +199,7 @@ public Boolean getComplete() {
return complete;
}

@JsonProperty("complete")
public void setComplete(Boolean complete) {
this.complete = complete;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public Pet id(@Nullable Long id) {
return id;
}

@JsonProperty("id")
public void setId(@Nullable Long id) {
this.id = id;
}
Expand All @@ -129,6 +130,7 @@ public Pet category(@Nullable Category category) {
return category;
}

@JsonProperty("category")
public void setCategory(@Nullable Category category) {
this.category = category;
}
Expand All @@ -149,6 +151,7 @@ public JsonNullable<String> getName() {
return name;
}

@JsonProperty("name")
public void setName(JsonNullable<String> name) {
this.name = name;
}
Expand All @@ -173,8 +176,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) {
*/
@NotNull
@Schema(name = "photoUrls", deprecated = true, requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("photoUrls")
@Deprecated
@JsonProperty("photoUrls")
public List<String> getPhotoUrls() {
return photoUrls;
}
Expand All @@ -183,6 +186,7 @@ public List<String> getPhotoUrls() {
* @deprecated
*/
@Deprecated
@JsonProperty("photoUrls")
public void setPhotoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
}
Expand Down Expand Up @@ -211,6 +215,7 @@ public Pet addTagsItem(Tag tagsItem) {
return tags;
}

@JsonProperty("tags")
public void setTags(List<@Valid Tag> tags) {
this.tags = tags;
}
Expand All @@ -231,6 +236,7 @@ public Pet status(@Nullable StatusEnum status) {
return status;
}

@JsonProperty("status")
public void setStatus(@Nullable StatusEnum status) {
this.status = status;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public Tag id(@Nullable Long id) {
return id;
}

@JsonProperty("id")
public void setId(@Nullable Long id) {
this.id = id;
}
Expand All @@ -63,6 +64,7 @@ public Tag name(@Nullable String name) {
return name;
}

@JsonProperty("name")
public void setName(@Nullable String name) {
this.name = name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public User id(@Nullable Long id) {
return id;
}

@JsonProperty("id")
public void setId(@Nullable Long id) {
this.id = id;
}
Expand All @@ -75,6 +76,7 @@ public User username(@Nullable String username) {
return username;
}

@JsonProperty("username")
public void setUsername(@Nullable String username) {
this.username = username;
}
Expand All @@ -95,6 +97,7 @@ public User firstName(@Nullable String firstName) {
return firstName;
}

@JsonProperty("firstName")
public void setFirstName(@Nullable String firstName) {
this.firstName = firstName;
}
Expand All @@ -115,6 +118,7 @@ public User lastName(@Nullable String lastName) {
return lastName;
}

@JsonProperty("lastName")
public void setLastName(@Nullable String lastName) {
this.lastName = lastName;
}
Expand All @@ -135,6 +139,7 @@ public User email(@Nullable String email) {
return email;
}

@JsonProperty("email")
public void setEmail(@Nullable String email) {
this.email = email;
}
Expand All @@ -155,6 +160,7 @@ public User password(@Nullable String password) {
return password;
}

@JsonProperty("password")
public void setPassword(@Nullable String password) {
this.password = password;
}
Expand All @@ -175,6 +181,7 @@ public User phone(@Nullable String phone) {
return phone;
}

@JsonProperty("phone")
public void setPhone(@Nullable String phone) {
this.phone = phone;
}
Expand All @@ -195,6 +202,7 @@ public User userStatus(@Nullable Integer userStatus) {
return userStatus;
}

@JsonProperty("userStatus")
public void setUserStatus(@Nullable Integer userStatus) {
this.userStatus = userStatus;
}
Expand Down
Loading
Loading