Skip to content

Commit

Permalink
better format
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed Jan 12, 2021
1 parent e6847c5 commit 05bbacd
Show file tree
Hide file tree
Showing 100 changed files with 506 additions and 105 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@
{{/isInteger}}
{{^isPrimitiveType}}
@Valid
{{/isPrimitiveType}}
{{/isPrimitiveType}}
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,16 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
@SerializedName("{{baseName}}")
{{/gson}}
{{#isContainer}}
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}}private {{{datatypeWithEnum}}} {{name}}{{#required}} = {{{defaultValue}}}{{/required}}{{^required}} = null{{/required}};
{{#useBeanValidation}}
{{>beanValidation}}
{{/useBeanValidation}}
private {{{datatypeWithEnum}}} {{name}}{{#required}} = {{{defaultValue}}}{{/required}}{{^required}} = null{{/required}};
{{/isContainer}}
{{^isContainer}}
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}}private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
{{#useBeanValidation}}
{{>beanValidation}}
{{/useBeanValidation}}
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
{{/isContainer}}

{{/vars}}
Expand Down Expand Up @@ -78,7 +84,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{/maximum}}
* @return {{name}}
**/
{{#vendorExtensions.x-extra-annotation}}
{{#vendorExtensions.x-extra-annotation}}
{{{vendorExtensions.x-extra-annotation}}}
{{/vendorExtensions.x-extra-annotation}}
public {{{datatypeWithEnum}}} {{getter}}() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Category {
@JsonProperty("id")

private Long id;

@JsonProperty("name")

private String name;

public Category id(Long id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse {
@JsonProperty("code")

private Integer code;

@JsonProperty("type")

private String type;

@JsonProperty("message")

private String message;

public ModelApiResponse code(Integer code) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,21 @@
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Order {
@JsonProperty("id")

private Long id;

@JsonProperty("petId")

private Long petId;

@JsonProperty("quantity")

private Integer quantity;

@JsonProperty("shipDate")
@Valid
private OffsetDateTime shipDate;

private OffsetDateTime shipDate;

/**
* Order Status
Expand Down Expand Up @@ -59,9 +63,11 @@ public static StatusEnum fromValue(String value) {
}

@JsonProperty("status")

private StatusEnum status;

@JsonProperty("complete")

private Boolean complete = false;

public Order id(Long id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,28 @@
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Pet {
@JsonProperty("id")

private Long id;

@JsonProperty("category")
@Valid
private Category category;

private Category category;

@JsonProperty("name")
@NotNull
private String name;

private String name;

@JsonProperty("photoUrls")
@NotNull
private List<String> photoUrls = new ArrayList<>();

private List<String> photoUrls = new ArrayList<>();

@JsonProperty("tags")
@Valid
private List<Tag> tags = null;

private List<Tag> tags = null;

/**
* pet status in the store
Expand Down Expand Up @@ -68,6 +73,7 @@ public static StatusEnum fromValue(String value) {
}

@JsonProperty("status")

private StatusEnum status;

public Pet id(Long id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Tag {
@JsonProperty("id")

private Long id;

@JsonProperty("name")

private String name;

public Tag id(Long id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,35 @@
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class User {
@JsonProperty("id")

private Long id;

@JsonProperty("username")

private String username;

@JsonProperty("firstName")

private String firstName;

@JsonProperty("lastName")

private String lastName;

@JsonProperty("email")

private String email;

@JsonProperty("password")

private String password;

@JsonProperty("phone")

private String phone;

@JsonProperty("userStatus")

private Integer userStatus;

public User id(Long id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Category {
@JsonProperty("id")

private Long id;

@JsonProperty("name")

private String name;

public Category id(Long id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse {
@JsonProperty("code")

private Integer code;

@JsonProperty("type")

private String type;

@JsonProperty("message")

private String message;

public ModelApiResponse code(Integer code) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,21 @@
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Order {
@JsonProperty("id")

private Long id;

@JsonProperty("petId")

private Long petId;

@JsonProperty("quantity")

private Integer quantity;

@JsonProperty("shipDate")
@Valid
private OffsetDateTime shipDate;

private OffsetDateTime shipDate;

/**
* Order Status
Expand Down Expand Up @@ -59,9 +63,11 @@ public static StatusEnum fromValue(String value) {
}

@JsonProperty("status")

private StatusEnum status;

@JsonProperty("complete")

private Boolean complete = false;

public Order id(Long id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,28 @@
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Pet {
@JsonProperty("id")

private Long id;

@JsonProperty("category")
@Valid
private Category category;

private Category category;

@JsonProperty("name")
@NotNull
private String name;

private String name;

@JsonProperty("photoUrls")
@NotNull
private List<String> photoUrls = new ArrayList<>();

private List<String> photoUrls = new ArrayList<>();

@JsonProperty("tags")
@Valid
private List<Tag> tags = null;

private List<Tag> tags = null;

/**
* pet status in the store
Expand Down Expand Up @@ -68,6 +73,7 @@ public static StatusEnum fromValue(String value) {
}

@JsonProperty("status")

private StatusEnum status;

public Pet id(Long id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Tag {
@JsonProperty("id")

private Long id;

@JsonProperty("name")

private String name;

public Tag id(Long id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,35 @@
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class User {
@JsonProperty("id")

private Long id;

@JsonProperty("username")

private String username;

@JsonProperty("firstName")

private String firstName;

@JsonProperty("lastName")

private String lastName;

@JsonProperty("email")

private String email;

@JsonProperty("password")

private String password;

@JsonProperty("phone")

private String phone;

@JsonProperty("userStatus")

private Integer userStatus;

public User id(Long id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Category {
@JsonProperty("id")

private Long id;

@JsonProperty("name")

private String name;

public Category id(Long id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse {
@JsonProperty("code")

private Integer code;

@JsonProperty("type")

private String type;

@JsonProperty("message")

private String message;

public ModelApiResponse code(Integer code) {
Expand Down
Loading

0 comments on commit 05bbacd

Please sign in to comment.