Springfox - PR review fixes
This commit is contained in:
parent
c7e8eb29ef
commit
848abce396
@ -50,8 +50,14 @@ public class SpringfoxApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private ApiInfo apiInfo() {
|
private ApiInfo apiInfo() {
|
||||||
return new ApiInfo("Springfox API specification", "User REST and Spring Data APIs",
|
return new ApiInfo("Springfox API specification",
|
||||||
"", "", null, "License of API", "API license URL", Collections.emptyList());
|
"User REST and Spring Data APIs",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
null,
|
||||||
|
"License of API",
|
||||||
|
"API license URL",
|
||||||
|
Collections.emptyList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@ -8,41 +8,41 @@ import javax.validation.constraints.NotNull;
|
|||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
public class User{
|
public class User {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@NotNull(message = "First Name cannot be null")
|
@NotNull(message = "First Name cannot be null")
|
||||||
private String firstName;
|
private String firstName;
|
||||||
|
|
||||||
@Min(value = 15, message = "Age should not be less than 15")
|
@Min(value = 15, message = "Age should not be less than 15")
|
||||||
@Max(value = 65, message = "Age should not be greater than 65")
|
@Max(value = 65, message = "Age should not be greater than 65")
|
||||||
private int age;
|
private int age;
|
||||||
|
|
||||||
@Email(regexp=".@.\\..*", message = "Email should be valid")
|
@Email(regexp=".@.\\..*", message = "Email should be valid")
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(Long id) {
|
public void setId(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFirstName() {
|
public String getFirstName() {
|
||||||
return firstName;
|
return firstName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFirstName(String firstName) {
|
public void setFirstName(String firstName) {
|
||||||
this.firstName = firstName;
|
this.firstName = firstName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getEmail() {
|
public String getEmail() {
|
||||||
return email;
|
return email;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEmail(String email) {
|
public void setEmail(String email) {
|
||||||
this.email = email;
|
this.email = email;
|
||||||
}
|
}
|
||||||
@ -54,5 +54,5 @@ public class User{
|
|||||||
public void setAge(int age) {
|
public void setAge(int age) {
|
||||||
this.age = age;
|
this.age = age;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user