forked from loafle/openapi-generator-original
[Play Framework] Regenerate the samples. It was very outdated (#3760)
* Generate the samples for Play Framework. It was very outdated * Add java-play-framework to the ensure-up-to-date script * Update samples
This commit is contained in:
parent
e1116814c4
commit
f94ff32b0c
@ -62,6 +62,7 @@ declare -a scripts=(
|
||||
"./bin/dart-flutter-petstore.sh"
|
||||
"./bin/dart-petstore.sh"
|
||||
"./bin/dart2-petstore.sh"
|
||||
"./bin/java-play-framework-petstore-server-all.sh"
|
||||
#"./bin/elm-petstore-all.sh"
|
||||
"./bin/meta-codegen.sh"
|
||||
# OTHERS
|
||||
|
@ -1 +1 @@
|
||||
3.1.1-SNAPSHOT
|
||||
4.1.2-SNAPSHOT
|
@ -12,10 +12,10 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Category {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
private String name;
|
||||
|
||||
public Category id(Long id) {
|
||||
this.id = id;
|
||||
|
@ -12,13 +12,13 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class ModelApiResponse {
|
||||
@JsonProperty("code")
|
||||
private Integer code = null;
|
||||
private Integer code;
|
||||
|
||||
@JsonProperty("type")
|
||||
private String type = null;
|
||||
private String type;
|
||||
|
||||
@JsonProperty("message")
|
||||
private String message = null;
|
||||
private String message;
|
||||
|
||||
public ModelApiResponse code(Integer code) {
|
||||
this.code = code;
|
||||
|
@ -13,16 +13,16 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Order {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("petId")
|
||||
private Long petId = null;
|
||||
private Long petId;
|
||||
|
||||
@JsonProperty("quantity")
|
||||
private Integer quantity = null;
|
||||
private Integer quantity;
|
||||
|
||||
@JsonProperty("shipDate")
|
||||
private OffsetDateTime shipDate = null;
|
||||
private OffsetDateTime shipDate;
|
||||
|
||||
/**
|
||||
* Order Status
|
||||
@ -47,18 +47,18 @@ public class Order {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static StatusEnum fromValue(String text) {
|
||||
public static StatusEnum fromValue(String value) {
|
||||
for (StatusEnum b : StatusEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@JsonProperty("status")
|
||||
private StatusEnum status = null;
|
||||
private StatusEnum status;
|
||||
|
||||
@JsonProperty("complete")
|
||||
private Boolean complete = false;
|
||||
|
@ -16,13 +16,13 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Pet {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("category")
|
||||
private Category category = null;
|
||||
private Category category;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
private String name;
|
||||
|
||||
@JsonProperty("photoUrls")
|
||||
private List<String> photoUrls = new ArrayList<>();
|
||||
@ -53,18 +53,18 @@ public class Pet {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static StatusEnum fromValue(String text) {
|
||||
public static StatusEnum fromValue(String value) {
|
||||
for (StatusEnum b : StatusEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@JsonProperty("status")
|
||||
private StatusEnum status = null;
|
||||
private StatusEnum status;
|
||||
|
||||
public Pet id(Long id) {
|
||||
this.id = id;
|
||||
|
@ -12,10 +12,10 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Tag {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
private String name;
|
||||
|
||||
public Tag id(Long id) {
|
||||
this.id = id;
|
||||
|
@ -12,28 +12,28 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class User {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("username")
|
||||
private String username = null;
|
||||
private String username;
|
||||
|
||||
@JsonProperty("firstName")
|
||||
private String firstName = null;
|
||||
private String firstName;
|
||||
|
||||
@JsonProperty("lastName")
|
||||
private String lastName = null;
|
||||
private String lastName;
|
||||
|
||||
@JsonProperty("email")
|
||||
private String email = null;
|
||||
private String email;
|
||||
|
||||
@JsonProperty("password")
|
||||
private String password = null;
|
||||
private String password;
|
||||
|
||||
@JsonProperty("phone")
|
||||
private String phone = null;
|
||||
private String phone;
|
||||
|
||||
@JsonProperty("userStatus")
|
||||
private Integer userStatus = null;
|
||||
private Integer userStatus;
|
||||
|
||||
public User id(Long id) {
|
||||
this.id = id;
|
||||
|
@ -39,17 +39,17 @@ public class PetApiController extends Controller {
|
||||
|
||||
@ApiAction
|
||||
public Result addPet() throws Exception {
|
||||
JsonNode nodepet = request().body().asJson();
|
||||
Pet pet;
|
||||
if (nodepet != null) {
|
||||
pet = mapper.readValue(nodepet.toString(), Pet.class);
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
Pet body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(pet);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'Pet' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
imp.addPet(pet);
|
||||
imp.addPet(body);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ -126,17 +126,17 @@ public class PetApiController extends Controller {
|
||||
|
||||
@ApiAction
|
||||
public Result updatePet() throws Exception {
|
||||
JsonNode nodepet = request().body().asJson();
|
||||
Pet pet;
|
||||
if (nodepet != null) {
|
||||
pet = mapper.readValue(nodepet.toString(), Pet.class);
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
Pet body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(pet);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'Pet' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
imp.updatePet(pet);
|
||||
imp.updatePet(body);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ -147,14 +147,14 @@ public class PetApiController extends Controller {
|
||||
if (valuename != null) {
|
||||
name = valuename;
|
||||
} else {
|
||||
name = "null";
|
||||
name = null;
|
||||
}
|
||||
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
||||
String status;
|
||||
if (valuestatus != null) {
|
||||
status = valuestatus;
|
||||
} else {
|
||||
status = "null";
|
||||
status = null;
|
||||
}
|
||||
imp.updatePetWithForm(petId, name, status);
|
||||
return ok();
|
||||
@ -167,7 +167,7 @@ public class PetApiController extends Controller {
|
||||
if (valueadditionalMetadata != null) {
|
||||
additionalMetadata = valueadditionalMetadata;
|
||||
} else {
|
||||
additionalMetadata = "null";
|
||||
additionalMetadata = null;
|
||||
}
|
||||
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
||||
ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file);
|
||||
|
@ -13,7 +13,7 @@ import javax.validation.constraints.*;
|
||||
|
||||
public class PetApiControllerImp implements PetApiControllerImpInterface {
|
||||
@Override
|
||||
public void addPet(Pet pet) throws Exception {
|
||||
public void addPet(Pet body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ public class PetApiControllerImp implements PetApiControllerImpInterface {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePet(Pet pet) throws Exception {
|
||||
public void updatePet(Pet body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ import javax.validation.constraints.*;
|
||||
|
||||
@SuppressWarnings("RedundantThrows")
|
||||
public interface PetApiControllerImpInterface {
|
||||
void addPet(Pet pet) throws Exception;
|
||||
void addPet(Pet body) throws Exception;
|
||||
|
||||
void deletePet(Long petId, String apiKey) throws Exception;
|
||||
|
||||
@ -23,7 +23,7 @@ public interface PetApiControllerImpInterface {
|
||||
|
||||
Pet getPetById(Long petId) throws Exception;
|
||||
|
||||
void updatePet(Pet pet) throws Exception;
|
||||
void updatePet(Pet body) throws Exception;
|
||||
|
||||
void updatePetWithForm(Long petId, String name, String status) throws Exception;
|
||||
|
||||
|
@ -61,17 +61,17 @@ public class StoreApiController extends Controller {
|
||||
|
||||
@ApiAction
|
||||
public Result placeOrder() throws Exception {
|
||||
JsonNode nodeorder = request().body().asJson();
|
||||
Order order;
|
||||
if (nodeorder != null) {
|
||||
order = mapper.readValue(nodeorder.toString(), Order.class);
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
Order body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), Order.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(order);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'Order' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
Order obj = imp.placeOrder(order);
|
||||
Order obj = imp.placeOrder(body);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ public class StoreApiControllerImp implements StoreApiControllerImpInterface {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Order placeOrder(Order order) throws Exception {
|
||||
public Order placeOrder(Order body) throws Exception {
|
||||
//Do your magic!!!
|
||||
return new Order();
|
||||
}
|
||||
|
@ -18,6 +18,6 @@ public interface StoreApiControllerImpInterface {
|
||||
|
||||
Order getOrderById( @Min(1) @Max(5)Long orderId) throws Exception;
|
||||
|
||||
Order placeOrder(Order order) throws Exception;
|
||||
Order placeOrder(Order body) throws Exception;
|
||||
|
||||
}
|
||||
|
@ -38,53 +38,53 @@ public class UserApiController extends Controller {
|
||||
|
||||
@ApiAction
|
||||
public Result createUser() throws Exception {
|
||||
JsonNode nodeuser = request().body().asJson();
|
||||
User user;
|
||||
if (nodeuser != null) {
|
||||
user = mapper.readValue(nodeuser.toString(), User.class);
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
User body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), User.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(user);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'User' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
imp.createUser(user);
|
||||
imp.createUser(body);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result createUsersWithArrayInput() throws Exception {
|
||||
JsonNode nodeuser = request().body().asJson();
|
||||
List<User> user;
|
||||
if (nodeuser != null) {
|
||||
user = mapper.readValue(nodeuser.toString(), new TypeReference<List<User>>(){});
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
List<User> body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
for (User curItem : user) {
|
||||
for (User curItem : body) {
|
||||
OpenAPIUtils.validate(curItem);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'User' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
imp.createUsersWithArrayInput(user);
|
||||
imp.createUsersWithArrayInput(body);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result createUsersWithListInput() throws Exception {
|
||||
JsonNode nodeuser = request().body().asJson();
|
||||
List<User> user;
|
||||
if (nodeuser != null) {
|
||||
user = mapper.readValue(nodeuser.toString(), new TypeReference<List<User>>(){});
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
List<User> body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
for (User curItem : user) {
|
||||
for (User curItem : body) {
|
||||
OpenAPIUtils.validate(curItem);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'User' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
imp.createUsersWithListInput(user);
|
||||
imp.createUsersWithListInput(body);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ -133,17 +133,17 @@ public class UserApiController extends Controller {
|
||||
|
||||
@ApiAction
|
||||
public Result updateUser(String username) throws Exception {
|
||||
JsonNode nodeuser = request().body().asJson();
|
||||
User user;
|
||||
if (nodeuser != null) {
|
||||
user = mapper.readValue(nodeuser.toString(), User.class);
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
User body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), User.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(user);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'User' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
imp.updateUser(username, user);
|
||||
imp.updateUser(username, body);
|
||||
return ok();
|
||||
}
|
||||
}
|
||||
|
@ -12,17 +12,17 @@ import javax.validation.constraints.*;
|
||||
|
||||
public class UserApiControllerImp implements UserApiControllerImpInterface {
|
||||
@Override
|
||||
public void createUser(User user) throws Exception {
|
||||
public void createUser(User body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createUsersWithArrayInput(List<User> user) throws Exception {
|
||||
public void createUsersWithArrayInput(List<User> body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createUsersWithListInput(List<User> user) throws Exception {
|
||||
public void createUsersWithListInput(List<User> body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ public class UserApiControllerImp implements UserApiControllerImpInterface {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateUser(String username, User user) throws Exception {
|
||||
public void updateUser(String username, User body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
|
@ -12,11 +12,11 @@ import javax.validation.constraints.*;
|
||||
|
||||
@SuppressWarnings("RedundantThrows")
|
||||
public interface UserApiControllerImpInterface {
|
||||
void createUser(User user) throws Exception;
|
||||
void createUser(User body) throws Exception;
|
||||
|
||||
void createUsersWithArrayInput(List<User> user) throws Exception;
|
||||
void createUsersWithArrayInput(List<User> body) throws Exception;
|
||||
|
||||
void createUsersWithListInput(List<User> user) throws Exception;
|
||||
void createUsersWithListInput(List<User> body) throws Exception;
|
||||
|
||||
void deleteUser(String username) throws Exception;
|
||||
|
||||
@ -26,6 +26,6 @@ public interface UserApiControllerImpInterface {
|
||||
|
||||
void logoutUser() throws Exception;
|
||||
|
||||
void updateUser(String username, User user) throws Exception;
|
||||
void updateUser(String username, User body) throws Exception;
|
||||
|
||||
}
|
||||
|
@ -98,6 +98,6 @@ public class OpenAPIUtils {
|
||||
}
|
||||
|
||||
public static String formatDatetime(Date date) {
|
||||
return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX").format(date);
|
||||
return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX", Locale.ROOT).format(date);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
3.1.1-SNAPSHOT
|
||||
4.1.2-SNAPSHOT
|
@ -12,10 +12,10 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Category {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
private String name;
|
||||
|
||||
public Category id(Long id) {
|
||||
this.id = id;
|
||||
|
@ -12,13 +12,13 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class ModelApiResponse {
|
||||
@JsonProperty("code")
|
||||
private Integer code = null;
|
||||
private Integer code;
|
||||
|
||||
@JsonProperty("type")
|
||||
private String type = null;
|
||||
private String type;
|
||||
|
||||
@JsonProperty("message")
|
||||
private String message = null;
|
||||
private String message;
|
||||
|
||||
public ModelApiResponse code(Integer code) {
|
||||
this.code = code;
|
||||
|
@ -13,16 +13,16 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Order {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("petId")
|
||||
private Long petId = null;
|
||||
private Long petId;
|
||||
|
||||
@JsonProperty("quantity")
|
||||
private Integer quantity = null;
|
||||
private Integer quantity;
|
||||
|
||||
@JsonProperty("shipDate")
|
||||
private OffsetDateTime shipDate = null;
|
||||
private OffsetDateTime shipDate;
|
||||
|
||||
/**
|
||||
* Order Status
|
||||
@ -47,18 +47,18 @@ public class Order {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static StatusEnum fromValue(String text) {
|
||||
public static StatusEnum fromValue(String value) {
|
||||
for (StatusEnum b : StatusEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@JsonProperty("status")
|
||||
private StatusEnum status = null;
|
||||
private StatusEnum status;
|
||||
|
||||
@JsonProperty("complete")
|
||||
private Boolean complete = false;
|
||||
|
@ -16,13 +16,13 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Pet {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("category")
|
||||
private Category category = null;
|
||||
private Category category;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
private String name;
|
||||
|
||||
@JsonProperty("photoUrls")
|
||||
private List<String> photoUrls = new ArrayList<>();
|
||||
@ -53,18 +53,18 @@ public class Pet {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static StatusEnum fromValue(String text) {
|
||||
public static StatusEnum fromValue(String value) {
|
||||
for (StatusEnum b : StatusEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@JsonProperty("status")
|
||||
private StatusEnum status = null;
|
||||
private StatusEnum status;
|
||||
|
||||
public Pet id(Long id) {
|
||||
this.id = id;
|
||||
|
@ -12,10 +12,10 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Tag {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
private String name;
|
||||
|
||||
public Tag id(Long id) {
|
||||
this.id = id;
|
||||
|
@ -12,28 +12,28 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class User {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("username")
|
||||
private String username = null;
|
||||
private String username;
|
||||
|
||||
@JsonProperty("firstName")
|
||||
private String firstName = null;
|
||||
private String firstName;
|
||||
|
||||
@JsonProperty("lastName")
|
||||
private String lastName = null;
|
||||
private String lastName;
|
||||
|
||||
@JsonProperty("email")
|
||||
private String email = null;
|
||||
private String email;
|
||||
|
||||
@JsonProperty("password")
|
||||
private String password = null;
|
||||
private String password;
|
||||
|
||||
@JsonProperty("phone")
|
||||
private String phone = null;
|
||||
private String phone;
|
||||
|
||||
@JsonProperty("userStatus")
|
||||
private Integer userStatus = null;
|
||||
private Integer userStatus;
|
||||
|
||||
public User id(Long id) {
|
||||
this.id = id;
|
||||
|
@ -17,9 +17,6 @@ import java.io.File;
|
||||
import openapitools.OpenAPIUtils;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
|
||||
import java.util.concurrent.CompletionStage;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import play.Configuration;
|
||||
|
||||
@ -41,25 +38,23 @@ public class PetApiController extends Controller {
|
||||
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> addPet() throws Exception {
|
||||
JsonNode nodepet = request().body().asJson();
|
||||
Pet pet;
|
||||
if (nodepet != null) {
|
||||
pet = mapper.readValue(nodepet.toString(), Pet.class);
|
||||
public Result addPet() throws Exception {
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
Pet body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(pet);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'Pet' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
imp.addPet(pet)
|
||||
return ok();
|
||||
});
|
||||
imp.addPet(body);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> deletePet(Long petId) throws Exception {
|
||||
public Result deletePet(Long petId) throws Exception {
|
||||
String valueapiKey = request().getHeader("api_key");
|
||||
String apiKey;
|
||||
if (valueapiKey != null) {
|
||||
@ -67,14 +62,12 @@ public class PetApiController extends Controller {
|
||||
} else {
|
||||
apiKey = null;
|
||||
}
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
imp.deletePet(petId, apiKey)
|
||||
return ok();
|
||||
});
|
||||
imp.deletePet(petId, apiKey);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> findPetsByStatus() throws Exception {
|
||||
public Result findPetsByStatus() throws Exception {
|
||||
String[] statusArray = request().queryString().get("status");
|
||||
if (statusArray == null) {
|
||||
throw new IllegalArgumentException("'status' parameter is required");
|
||||
@ -87,22 +80,18 @@ public class PetApiController extends Controller {
|
||||
status.add(curParam);
|
||||
}
|
||||
}
|
||||
CompletionStage<List<Pet>> stage = imp.findPetsByStatus(status).thenApply(obj -> {
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
OpenAPIUtils.validate(curItem);
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByStatus(status);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
OpenAPIUtils.validate(curItem);
|
||||
}
|
||||
return obj;
|
||||
});
|
||||
stage.thenApply(obj -> {
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
});
|
||||
}
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> findPetsByTags() throws Exception {
|
||||
public Result findPetsByTags() throws Exception {
|
||||
String[] tagsArray = request().queryString().get("tags");
|
||||
if (tagsArray == null) {
|
||||
throw new IllegalArgumentException("'tags' parameter is required");
|
||||
@ -115,93 +104,77 @@ public class PetApiController extends Controller {
|
||||
tags.add(curParam);
|
||||
}
|
||||
}
|
||||
CompletionStage<List<Pet>> stage = imp.findPetsByTags(tags).thenApply(obj -> {
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
OpenAPIUtils.validate(curItem);
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByTags(tags);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
OpenAPIUtils.validate(curItem);
|
||||
}
|
||||
return obj;
|
||||
});
|
||||
stage.thenApply(obj -> {
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
});
|
||||
}
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> getPetById(Long petId) throws Exception {
|
||||
CompletionStage<Pet> stage = imp.getPetById(petId).thenApply(obj -> {
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
return obj;
|
||||
});
|
||||
stage.thenApply(obj -> {
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
});
|
||||
public Result getPetById(Long petId) throws Exception {
|
||||
Pet obj = imp.getPetById(petId);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> updatePet() throws Exception {
|
||||
JsonNode nodepet = request().body().asJson();
|
||||
Pet pet;
|
||||
if (nodepet != null) {
|
||||
pet = mapper.readValue(nodepet.toString(), Pet.class);
|
||||
public Result updatePet() throws Exception {
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
Pet body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(pet);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'Pet' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
imp.updatePet(pet)
|
||||
return ok();
|
||||
});
|
||||
imp.updatePet(body);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> updatePetWithForm(Long petId) throws Exception {
|
||||
public Result updatePetWithForm(Long petId) throws Exception {
|
||||
String valuename = (request().body().asMultipartFormData().asFormUrlEncoded().get("name"))[0];
|
||||
String name;
|
||||
if (valuename != null) {
|
||||
name = valuename;
|
||||
} else {
|
||||
name = "null";
|
||||
name = null;
|
||||
}
|
||||
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
||||
String status;
|
||||
if (valuestatus != null) {
|
||||
status = valuestatus;
|
||||
} else {
|
||||
status = "null";
|
||||
status = null;
|
||||
}
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
imp.updatePetWithForm(petId, name, status)
|
||||
return ok();
|
||||
});
|
||||
imp.updatePetWithForm(petId, name, status);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> uploadFile(Long petId) throws Exception {
|
||||
public Result uploadFile(Long petId) throws Exception {
|
||||
String valueadditionalMetadata = (request().body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0];
|
||||
String additionalMetadata;
|
||||
if (valueadditionalMetadata != null) {
|
||||
additionalMetadata = valueadditionalMetadata;
|
||||
} else {
|
||||
additionalMetadata = "null";
|
||||
additionalMetadata = null;
|
||||
}
|
||||
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
||||
CompletionStage<ModelApiResponse> stage = imp.uploadFile(petId, additionalMetadata, file).thenApply(obj -> {
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
return obj;
|
||||
});
|
||||
stage.thenApply(obj -> {
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
});
|
||||
ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ import javax.validation.constraints.*;
|
||||
|
||||
public class PetApiControllerImp implements PetApiControllerImpInterface {
|
||||
@Override
|
||||
public void addPet(Pet pet) throws Exception {
|
||||
public void addPet(Pet body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@ -23,31 +23,25 @@ public class PetApiControllerImp implements PetApiControllerImpInterface {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletionStage<List<Pet>> findPetsByStatus( @NotNull List<String> status) throws Exception {
|
||||
public List<Pet> findPetsByStatus( @NotNull List<String> status) throws Exception {
|
||||
//Do your magic!!!
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
return new ArrayList<Pet>();
|
||||
});
|
||||
return new ArrayList<Pet>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletionStage<List<Pet>> findPetsByTags( @NotNull List<String> tags) throws Exception {
|
||||
public List<Pet> findPetsByTags( @NotNull List<String> tags) throws Exception {
|
||||
//Do your magic!!!
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
return new ArrayList<Pet>();
|
||||
});
|
||||
return new ArrayList<Pet>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletionStage<Pet> getPetById(Long petId) throws Exception {
|
||||
public Pet getPetById(Long petId) throws Exception {
|
||||
//Do your magic!!!
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
return new Pet();
|
||||
});
|
||||
return new Pet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePet(Pet pet) throws Exception {
|
||||
public void updatePet(Pet body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@ -57,11 +51,9 @@ public class PetApiControllerImp implements PetApiControllerImpInterface {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletionStage<ModelApiResponse> uploadFile(Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception {
|
||||
public ModelApiResponse uploadFile(Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception {
|
||||
//Do your magic!!!
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
return new ModelApiResponse();
|
||||
});
|
||||
return new ModelApiResponse();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,27 +8,25 @@ import play.mvc.Http;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.CompletionStage;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@SuppressWarnings("RedundantThrows")
|
||||
public interface PetApiControllerImpInterface {
|
||||
void addPet(Pet pet) throws Exception;
|
||||
void addPet(Pet body) throws Exception;
|
||||
|
||||
void deletePet(Long petId, String apiKey) throws Exception;
|
||||
|
||||
CompletionStage<List<Pet>> findPetsByStatus( @NotNull List<String> status) throws Exception;
|
||||
List<Pet> findPetsByStatus( @NotNull List<String> status) throws Exception;
|
||||
|
||||
CompletionStage<List<Pet>> findPetsByTags( @NotNull List<String> tags) throws Exception;
|
||||
List<Pet> findPetsByTags( @NotNull List<String> tags) throws Exception;
|
||||
|
||||
CompletionStage<Pet> getPetById(Long petId) throws Exception;
|
||||
Pet getPetById(Long petId) throws Exception;
|
||||
|
||||
void updatePet(Pet pet) throws Exception;
|
||||
void updatePet(Pet body) throws Exception;
|
||||
|
||||
void updatePetWithForm(Long petId, String name, String status) throws Exception;
|
||||
|
||||
CompletionStage<ModelApiResponse> uploadFile(Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception;
|
||||
ModelApiResponse uploadFile(Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception;
|
||||
|
||||
}
|
||||
|
@ -16,9 +16,6 @@ import java.io.File;
|
||||
import openapitools.OpenAPIUtils;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
|
||||
import java.util.concurrent.CompletionStage;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import play.Configuration;
|
||||
|
||||
@ -40,59 +37,45 @@ public class StoreApiController extends Controller {
|
||||
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> deleteOrder(String orderId) throws Exception {
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
imp.deleteOrder(orderId)
|
||||
return ok();
|
||||
});
|
||||
public Result deleteOrder(String orderId) throws Exception {
|
||||
imp.deleteOrder(orderId);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> getInventory() throws Exception {
|
||||
CompletionStage<Map<String, Integer>> stage = imp.getInventory().thenApply(obj -> {
|
||||
return obj;
|
||||
});
|
||||
stage.thenApply(obj -> {
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
});
|
||||
public Result getInventory() throws Exception {
|
||||
Map<String, Integer> obj = imp.getInventory();
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> getOrderById( @Min(1) @Max(5)Long orderId) throws Exception {
|
||||
CompletionStage<Order> stage = imp.getOrderById(orderId).thenApply(obj -> {
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
return obj;
|
||||
});
|
||||
stage.thenApply(obj -> {
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
});
|
||||
public Result getOrderById( @Min(1) @Max(5)Long orderId) throws Exception {
|
||||
Order obj = imp.getOrderById(orderId);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> placeOrder() throws Exception {
|
||||
JsonNode nodeorder = request().body().asJson();
|
||||
Order order;
|
||||
if (nodeorder != null) {
|
||||
order = mapper.readValue(nodeorder.toString(), Order.class);
|
||||
public Result placeOrder() throws Exception {
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
Order body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), Order.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(order);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'Order' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
CompletionStage<Order> stage = imp.placeOrder(order).thenApply(obj -> {
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
return obj;
|
||||
});
|
||||
stage.thenApply(obj -> {
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
});
|
||||
Order obj = imp.placeOrder(body);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
}
|
||||
}
|
||||
|
@ -17,27 +17,21 @@ public class StoreApiControllerImp implements StoreApiControllerImpInterface {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletionStage<Map<String, Integer>> getInventory() throws Exception {
|
||||
public Map<String, Integer> getInventory() throws Exception {
|
||||
//Do your magic!!!
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
return new HashMap<String, Integer>();
|
||||
});
|
||||
return new HashMap<String, Integer>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletionStage<Order> getOrderById( @Min(1) @Max(5)Long orderId) throws Exception {
|
||||
public Order getOrderById( @Min(1) @Max(5)Long orderId) throws Exception {
|
||||
//Do your magic!!!
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
return new Order();
|
||||
});
|
||||
return new Order();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletionStage<Order> placeOrder(Order order) throws Exception {
|
||||
public Order placeOrder(Order body) throws Exception {
|
||||
//Do your magic!!!
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
return new Order();
|
||||
});
|
||||
return new Order();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,8 +7,6 @@ import play.mvc.Http;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.CompletionStage;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -16,10 +14,10 @@ import javax.validation.constraints.*;
|
||||
public interface StoreApiControllerImpInterface {
|
||||
void deleteOrder(String orderId) throws Exception;
|
||||
|
||||
CompletionStage<Map<String, Integer>> getInventory() throws Exception;
|
||||
Map<String, Integer> getInventory() throws Exception;
|
||||
|
||||
CompletionStage<Order> getOrderById( @Min(1) @Max(5)Long orderId) throws Exception;
|
||||
Order getOrderById( @Min(1) @Max(5)Long orderId) throws Exception;
|
||||
|
||||
CompletionStage<Order> placeOrder(Order order) throws Exception;
|
||||
Order placeOrder(Order body) throws Exception;
|
||||
|
||||
}
|
||||
|
@ -16,9 +16,6 @@ import java.io.File;
|
||||
import openapitools.OpenAPIUtils;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
|
||||
import java.util.concurrent.CompletionStage;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import play.Configuration;
|
||||
|
||||
@ -40,87 +37,75 @@ public class UserApiController extends Controller {
|
||||
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> createUser() throws Exception {
|
||||
JsonNode nodeuser = request().body().asJson();
|
||||
User user;
|
||||
if (nodeuser != null) {
|
||||
user = mapper.readValue(nodeuser.toString(), User.class);
|
||||
public Result createUser() throws Exception {
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
User body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), User.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(user);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'User' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
imp.createUser(user)
|
||||
return ok();
|
||||
});
|
||||
imp.createUser(body);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> createUsersWithArrayInput() throws Exception {
|
||||
JsonNode nodeuser = request().body().asJson();
|
||||
List<User> user;
|
||||
if (nodeuser != null) {
|
||||
user = mapper.readValue(nodeuser.toString(), new TypeReference<List<User>>(){});
|
||||
public Result createUsersWithArrayInput() throws Exception {
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
List<User> body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
for (User curItem : user) {
|
||||
for (User curItem : body) {
|
||||
OpenAPIUtils.validate(curItem);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'User' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
imp.createUsersWithArrayInput(user)
|
||||
return ok();
|
||||
});
|
||||
imp.createUsersWithArrayInput(body);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> createUsersWithListInput() throws Exception {
|
||||
JsonNode nodeuser = request().body().asJson();
|
||||
List<User> user;
|
||||
if (nodeuser != null) {
|
||||
user = mapper.readValue(nodeuser.toString(), new TypeReference<List<User>>(){});
|
||||
public Result createUsersWithListInput() throws Exception {
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
List<User> body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
for (User curItem : user) {
|
||||
for (User curItem : body) {
|
||||
OpenAPIUtils.validate(curItem);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'User' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
imp.createUsersWithListInput(user)
|
||||
return ok();
|
||||
});
|
||||
imp.createUsersWithListInput(body);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> deleteUser(String username) throws Exception {
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
imp.deleteUser(username)
|
||||
return ok();
|
||||
});
|
||||
public Result deleteUser(String username) throws Exception {
|
||||
imp.deleteUser(username);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> getUserByName(String username) throws Exception {
|
||||
CompletionStage<User> stage = imp.getUserByName(username).thenApply(obj -> {
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
return obj;
|
||||
});
|
||||
stage.thenApply(obj -> {
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
});
|
||||
public Result getUserByName(String username) throws Exception {
|
||||
User obj = imp.getUserByName(username);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> loginUser() throws Exception {
|
||||
public Result loginUser() throws Exception {
|
||||
String valueusername = request().getQueryString("username");
|
||||
String username;
|
||||
if (valueusername != null) {
|
||||
@ -135,38 +120,30 @@ public class UserApiController extends Controller {
|
||||
} else {
|
||||
throw new IllegalArgumentException("'password' parameter is required");
|
||||
}
|
||||
CompletionStage<String> stage = imp.loginUser(username, password).thenApply(obj -> {
|
||||
return obj;
|
||||
});
|
||||
stage.thenApply(obj -> {
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
});
|
||||
String obj = imp.loginUser(username, password);
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> logoutUser() throws Exception {
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
imp.logoutUser()
|
||||
return ok();
|
||||
});
|
||||
public Result logoutUser() throws Exception {
|
||||
imp.logoutUser();
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public CompletionStage<Result> updateUser(String username) throws Exception {
|
||||
JsonNode nodeuser = request().body().asJson();
|
||||
User user;
|
||||
if (nodeuser != null) {
|
||||
user = mapper.readValue(nodeuser.toString(), User.class);
|
||||
public Result updateUser(String username) throws Exception {
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
User body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), User.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(user);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'User' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
imp.updateUser(username, user)
|
||||
return ok();
|
||||
});
|
||||
imp.updateUser(username, body);
|
||||
return ok();
|
||||
}
|
||||
}
|
||||
|
@ -12,17 +12,17 @@ import javax.validation.constraints.*;
|
||||
|
||||
public class UserApiControllerImp implements UserApiControllerImpInterface {
|
||||
@Override
|
||||
public void createUser(User user) throws Exception {
|
||||
public void createUser(User body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createUsersWithArrayInput(List<User> user) throws Exception {
|
||||
public void createUsersWithArrayInput(List<User> body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createUsersWithListInput(List<User> user) throws Exception {
|
||||
public void createUsersWithListInput(List<User> body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@ -32,19 +32,15 @@ public class UserApiControllerImp implements UserApiControllerImpInterface {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletionStage<User> getUserByName(String username) throws Exception {
|
||||
public User getUserByName(String username) throws Exception {
|
||||
//Do your magic!!!
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
return new User();
|
||||
});
|
||||
return new User();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletionStage<String> loginUser( @NotNull String username, @NotNull String password) throws Exception {
|
||||
public String loginUser( @NotNull String username, @NotNull String password) throws Exception {
|
||||
//Do your magic!!!
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
return new String();
|
||||
});
|
||||
return new String();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -53,7 +49,7 @@ public class UserApiControllerImp implements UserApiControllerImpInterface {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateUser(String username, User user) throws Exception {
|
||||
public void updateUser(String username, User body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
|
@ -7,27 +7,25 @@ import play.mvc.Http;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.CompletionStage;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@SuppressWarnings("RedundantThrows")
|
||||
public interface UserApiControllerImpInterface {
|
||||
void createUser(User user) throws Exception;
|
||||
void createUser(User body) throws Exception;
|
||||
|
||||
void createUsersWithArrayInput(List<User> user) throws Exception;
|
||||
void createUsersWithArrayInput(List<User> body) throws Exception;
|
||||
|
||||
void createUsersWithListInput(List<User> user) throws Exception;
|
||||
void createUsersWithListInput(List<User> body) throws Exception;
|
||||
|
||||
void deleteUser(String username) throws Exception;
|
||||
|
||||
CompletionStage<User> getUserByName(String username) throws Exception;
|
||||
User getUserByName(String username) throws Exception;
|
||||
|
||||
CompletionStage<String> loginUser( @NotNull String username, @NotNull String password) throws Exception;
|
||||
String loginUser( @NotNull String username, @NotNull String password) throws Exception;
|
||||
|
||||
void logoutUser() throws Exception;
|
||||
|
||||
void updateUser(String username, User user) throws Exception;
|
||||
void updateUser(String username, User body) throws Exception;
|
||||
|
||||
}
|
||||
|
@ -98,6 +98,6 @@ public class OpenAPIUtils {
|
||||
}
|
||||
|
||||
public static String formatDatetime(Date date) {
|
||||
return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX").format(date);
|
||||
return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX", Locale.ROOT).format(date);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
3.1.1-SNAPSHOT
|
||||
4.1.2-SNAPSHOT
|
@ -12,10 +12,10 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Category {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
private String name;
|
||||
|
||||
public Category id(Long id) {
|
||||
this.id = id;
|
||||
|
@ -12,13 +12,13 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class ModelApiResponse {
|
||||
@JsonProperty("code")
|
||||
private Integer code = null;
|
||||
private Integer code;
|
||||
|
||||
@JsonProperty("type")
|
||||
private String type = null;
|
||||
private String type;
|
||||
|
||||
@JsonProperty("message")
|
||||
private String message = null;
|
||||
private String message;
|
||||
|
||||
public ModelApiResponse code(Integer code) {
|
||||
this.code = code;
|
||||
|
@ -13,16 +13,16 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Order {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("petId")
|
||||
private Long petId = null;
|
||||
private Long petId;
|
||||
|
||||
@JsonProperty("quantity")
|
||||
private Integer quantity = null;
|
||||
private Integer quantity;
|
||||
|
||||
@JsonProperty("shipDate")
|
||||
private OffsetDateTime shipDate = null;
|
||||
private OffsetDateTime shipDate;
|
||||
|
||||
/**
|
||||
* Order Status
|
||||
@ -47,18 +47,18 @@ public class Order {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static StatusEnum fromValue(String text) {
|
||||
public static StatusEnum fromValue(String value) {
|
||||
for (StatusEnum b : StatusEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@JsonProperty("status")
|
||||
private StatusEnum status = null;
|
||||
private StatusEnum status;
|
||||
|
||||
@JsonProperty("complete")
|
||||
private Boolean complete = false;
|
||||
|
@ -16,13 +16,13 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Pet {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("category")
|
||||
private Category category = null;
|
||||
private Category category;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
private String name;
|
||||
|
||||
@JsonProperty("photoUrls")
|
||||
private List<String> photoUrls = new ArrayList<>();
|
||||
@ -53,18 +53,18 @@ public class Pet {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static StatusEnum fromValue(String text) {
|
||||
public static StatusEnum fromValue(String value) {
|
||||
for (StatusEnum b : StatusEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@JsonProperty("status")
|
||||
private StatusEnum status = null;
|
||||
private StatusEnum status;
|
||||
|
||||
public Pet id(Long id) {
|
||||
this.id = id;
|
||||
|
@ -12,10 +12,10 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Tag {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
private String name;
|
||||
|
||||
public Tag id(Long id) {
|
||||
this.id = id;
|
||||
|
@ -12,28 +12,28 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class User {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("username")
|
||||
private String username = null;
|
||||
private String username;
|
||||
|
||||
@JsonProperty("firstName")
|
||||
private String firstName = null;
|
||||
private String firstName;
|
||||
|
||||
@JsonProperty("lastName")
|
||||
private String lastName = null;
|
||||
private String lastName;
|
||||
|
||||
@JsonProperty("email")
|
||||
private String email = null;
|
||||
private String email;
|
||||
|
||||
@JsonProperty("password")
|
||||
private String password = null;
|
||||
private String password;
|
||||
|
||||
@JsonProperty("phone")
|
||||
private String phone = null;
|
||||
private String phone;
|
||||
|
||||
@JsonProperty("userStatus")
|
||||
private Integer userStatus = null;
|
||||
private Integer userStatus;
|
||||
|
||||
public User id(Long id) {
|
||||
this.id = id;
|
||||
|
@ -37,15 +37,15 @@ public class PetApiController extends Controller {
|
||||
|
||||
@ApiAction
|
||||
public Result addPet() throws Exception {
|
||||
JsonNode nodepet = request().body().asJson();
|
||||
Pet pet;
|
||||
if (nodepet != null) {
|
||||
pet = mapper.readValue(nodepet.toString(), Pet.class);
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
Pet body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(pet);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'Pet' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
return ok();
|
||||
}
|
||||
@ -103,15 +103,15 @@ public class PetApiController extends Controller {
|
||||
|
||||
@ApiAction
|
||||
public Result updatePet() throws Exception {
|
||||
JsonNode nodepet = request().body().asJson();
|
||||
Pet pet;
|
||||
if (nodepet != null) {
|
||||
pet = mapper.readValue(nodepet.toString(), Pet.class);
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
Pet body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(pet);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'Pet' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
return ok();
|
||||
}
|
||||
@ -123,14 +123,14 @@ public class PetApiController extends Controller {
|
||||
if (valuename != null) {
|
||||
name = valuename;
|
||||
} else {
|
||||
name = "null";
|
||||
name = null;
|
||||
}
|
||||
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
||||
String status;
|
||||
if (valuestatus != null) {
|
||||
status = valuestatus;
|
||||
} else {
|
||||
status = "null";
|
||||
status = null;
|
||||
}
|
||||
return ok();
|
||||
}
|
||||
@ -142,7 +142,7 @@ public class PetApiController extends Controller {
|
||||
if (valueadditionalMetadata != null) {
|
||||
additionalMetadata = valueadditionalMetadata;
|
||||
} else {
|
||||
additionalMetadata = "null";
|
||||
additionalMetadata = null;
|
||||
}
|
||||
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
||||
return ok();
|
||||
|
@ -51,15 +51,15 @@ public class StoreApiController extends Controller {
|
||||
|
||||
@ApiAction
|
||||
public Result placeOrder() throws Exception {
|
||||
JsonNode nodeorder = request().body().asJson();
|
||||
Order order;
|
||||
if (nodeorder != null) {
|
||||
order = mapper.readValue(nodeorder.toString(), Order.class);
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
Order body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), Order.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(order);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'Order' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
return ok();
|
||||
}
|
||||
|
@ -36,49 +36,49 @@ public class UserApiController extends Controller {
|
||||
|
||||
@ApiAction
|
||||
public Result createUser() throws Exception {
|
||||
JsonNode nodeuser = request().body().asJson();
|
||||
User user;
|
||||
if (nodeuser != null) {
|
||||
user = mapper.readValue(nodeuser.toString(), User.class);
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
User body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), User.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(user);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'User' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result createUsersWithArrayInput() throws Exception {
|
||||
JsonNode nodeuser = request().body().asJson();
|
||||
List<User> user;
|
||||
if (nodeuser != null) {
|
||||
user = mapper.readValue(nodeuser.toString(), new TypeReference<List<User>>(){});
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
List<User> body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
for (User curItem : user) {
|
||||
for (User curItem : body) {
|
||||
OpenAPIUtils.validate(curItem);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'User' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result createUsersWithListInput() throws Exception {
|
||||
JsonNode nodeuser = request().body().asJson();
|
||||
List<User> user;
|
||||
if (nodeuser != null) {
|
||||
user = mapper.readValue(nodeuser.toString(), new TypeReference<List<User>>(){});
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
List<User> body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
for (User curItem : user) {
|
||||
for (User curItem : body) {
|
||||
OpenAPIUtils.validate(curItem);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'User' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
return ok();
|
||||
}
|
||||
@ -119,15 +119,15 @@ public class UserApiController extends Controller {
|
||||
|
||||
@ApiAction
|
||||
public Result updateUser(String username) throws Exception {
|
||||
JsonNode nodeuser = request().body().asJson();
|
||||
User user;
|
||||
if (nodeuser != null) {
|
||||
user = mapper.readValue(nodeuser.toString(), User.class);
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
User body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), User.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(user);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'User' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
return ok();
|
||||
}
|
||||
|
@ -98,6 +98,6 @@ public class OpenAPIUtils {
|
||||
}
|
||||
|
||||
public static String formatDatetime(Date date) {
|
||||
return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX").format(date);
|
||||
return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX", Locale.ROOT).format(date);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
3.1.1-SNAPSHOT
|
||||
4.1.2-SNAPSHOT
|
@ -0,0 +1,77 @@
|
||||
package apimodels;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import java.util.Set;
|
||||
import javax.validation.*;
|
||||
import java.util.Objects;
|
||||
import javax.validation.constraints.*;
|
||||
/**
|
||||
* AdditionalPropertiesAnyType
|
||||
*/
|
||||
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesAnyType name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o;
|
||||
return Objects.equals(name, additionalPropertiesAnyType.name) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
}
|
||||
|
||||
@SuppressWarnings("StringBufferReplaceableByString")
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesAnyType {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,78 @@
|
||||
package apimodels;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import java.util.Set;
|
||||
import javax.validation.*;
|
||||
import java.util.Objects;
|
||||
import javax.validation.constraints.*;
|
||||
/**
|
||||
* AdditionalPropertiesArray
|
||||
*/
|
||||
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class AdditionalPropertiesArray extends HashMap<String, List> {
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesArray name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o;
|
||||
return Objects.equals(name, additionalPropertiesArray.name) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
}
|
||||
|
||||
@SuppressWarnings("StringBufferReplaceableByString")
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesArray {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,77 @@
|
||||
package apimodels;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import java.util.Set;
|
||||
import javax.validation.*;
|
||||
import java.util.Objects;
|
||||
import javax.validation.constraints.*;
|
||||
/**
|
||||
* AdditionalPropertiesBoolean
|
||||
*/
|
||||
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> {
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesBoolean name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o;
|
||||
return Objects.equals(name, additionalPropertiesBoolean.name) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
}
|
||||
|
||||
@SuppressWarnings("StringBufferReplaceableByString")
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesBoolean {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package apimodels;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -14,61 +15,296 @@ import javax.validation.constraints.*;
|
||||
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class AdditionalPropertiesClass {
|
||||
@JsonProperty("map_property")
|
||||
private Map<String, String> mapProperty = null;
|
||||
@JsonProperty("map_string")
|
||||
private Map<String, String> mapString = null;
|
||||
|
||||
@JsonProperty("map_of_map_property")
|
||||
private Map<String, Map<String, String>> mapOfMapProperty = null;
|
||||
@JsonProperty("map_number")
|
||||
private Map<String, BigDecimal> mapNumber = null;
|
||||
|
||||
public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
|
||||
this.mapProperty = mapProperty;
|
||||
@JsonProperty("map_integer")
|
||||
private Map<String, Integer> mapInteger = null;
|
||||
|
||||
@JsonProperty("map_boolean")
|
||||
private Map<String, Boolean> mapBoolean = null;
|
||||
|
||||
@JsonProperty("map_array_integer")
|
||||
private Map<String, List<Integer>> mapArrayInteger = null;
|
||||
|
||||
@JsonProperty("map_array_anytype")
|
||||
private Map<String, List<Object>> mapArrayAnytype = null;
|
||||
|
||||
@JsonProperty("map_map_string")
|
||||
private Map<String, Map<String, String>> mapMapString = null;
|
||||
|
||||
@JsonProperty("map_map_anytype")
|
||||
private Map<String, Map<String, Object>> mapMapAnytype = null;
|
||||
|
||||
@JsonProperty("anytype_1")
|
||||
private Object anytype1;
|
||||
|
||||
@JsonProperty("anytype_2")
|
||||
private Object anytype2;
|
||||
|
||||
@JsonProperty("anytype_3")
|
||||
private Object anytype3;
|
||||
|
||||
public AdditionalPropertiesClass mapString(Map<String, String> mapString) {
|
||||
this.mapString = mapString;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
|
||||
if (this.mapProperty == null) {
|
||||
this.mapProperty = new HashMap<>();
|
||||
public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) {
|
||||
if (this.mapString == null) {
|
||||
this.mapString = new HashMap<>();
|
||||
}
|
||||
this.mapProperty.put(key, mapPropertyItem);
|
||||
this.mapString.put(key, mapStringItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get mapProperty
|
||||
* @return mapProperty
|
||||
* Get mapString
|
||||
* @return mapString
|
||||
**/
|
||||
public Map<String, String> getMapProperty() {
|
||||
return mapProperty;
|
||||
public Map<String, String> getMapString() {
|
||||
return mapString;
|
||||
}
|
||||
|
||||
public void setMapProperty(Map<String, String> mapProperty) {
|
||||
this.mapProperty = mapProperty;
|
||||
public void setMapString(Map<String, String> mapString) {
|
||||
this.mapString = mapString;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass mapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
|
||||
this.mapOfMapProperty = mapOfMapProperty;
|
||||
public AdditionalPropertiesClass mapNumber(Map<String, BigDecimal> mapNumber) {
|
||||
this.mapNumber = mapNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
|
||||
if (this.mapOfMapProperty == null) {
|
||||
this.mapOfMapProperty = new HashMap<>();
|
||||
public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) {
|
||||
if (this.mapNumber == null) {
|
||||
this.mapNumber = new HashMap<>();
|
||||
}
|
||||
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
|
||||
this.mapNumber.put(key, mapNumberItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get mapOfMapProperty
|
||||
* @return mapOfMapProperty
|
||||
* Get mapNumber
|
||||
* @return mapNumber
|
||||
**/
|
||||
@Valid
|
||||
public Map<String, Map<String, String>> getMapOfMapProperty() {
|
||||
return mapOfMapProperty;
|
||||
public Map<String, BigDecimal> getMapNumber() {
|
||||
return mapNumber;
|
||||
}
|
||||
|
||||
public void setMapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
|
||||
this.mapOfMapProperty = mapOfMapProperty;
|
||||
public void setMapNumber(Map<String, BigDecimal> mapNumber) {
|
||||
this.mapNumber = mapNumber;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass mapInteger(Map<String, Integer> mapInteger) {
|
||||
this.mapInteger = mapInteger;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) {
|
||||
if (this.mapInteger == null) {
|
||||
this.mapInteger = new HashMap<>();
|
||||
}
|
||||
this.mapInteger.put(key, mapIntegerItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get mapInteger
|
||||
* @return mapInteger
|
||||
**/
|
||||
public Map<String, Integer> getMapInteger() {
|
||||
return mapInteger;
|
||||
}
|
||||
|
||||
public void setMapInteger(Map<String, Integer> mapInteger) {
|
||||
this.mapInteger = mapInteger;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass mapBoolean(Map<String, Boolean> mapBoolean) {
|
||||
this.mapBoolean = mapBoolean;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) {
|
||||
if (this.mapBoolean == null) {
|
||||
this.mapBoolean = new HashMap<>();
|
||||
}
|
||||
this.mapBoolean.put(key, mapBooleanItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get mapBoolean
|
||||
* @return mapBoolean
|
||||
**/
|
||||
public Map<String, Boolean> getMapBoolean() {
|
||||
return mapBoolean;
|
||||
}
|
||||
|
||||
public void setMapBoolean(Map<String, Boolean> mapBoolean) {
|
||||
this.mapBoolean = mapBoolean;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass mapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
|
||||
this.mapArrayInteger = mapArrayInteger;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List<Integer> mapArrayIntegerItem) {
|
||||
if (this.mapArrayInteger == null) {
|
||||
this.mapArrayInteger = new HashMap<>();
|
||||
}
|
||||
this.mapArrayInteger.put(key, mapArrayIntegerItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get mapArrayInteger
|
||||
* @return mapArrayInteger
|
||||
**/
|
||||
@Valid
|
||||
public Map<String, List<Integer>> getMapArrayInteger() {
|
||||
return mapArrayInteger;
|
||||
}
|
||||
|
||||
public void setMapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
|
||||
this.mapArrayInteger = mapArrayInteger;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass mapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
|
||||
this.mapArrayAnytype = mapArrayAnytype;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List<Object> mapArrayAnytypeItem) {
|
||||
if (this.mapArrayAnytype == null) {
|
||||
this.mapArrayAnytype = new HashMap<>();
|
||||
}
|
||||
this.mapArrayAnytype.put(key, mapArrayAnytypeItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get mapArrayAnytype
|
||||
* @return mapArrayAnytype
|
||||
**/
|
||||
@Valid
|
||||
public Map<String, List<Object>> getMapArrayAnytype() {
|
||||
return mapArrayAnytype;
|
||||
}
|
||||
|
||||
public void setMapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
|
||||
this.mapArrayAnytype = mapArrayAnytype;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass mapMapString(Map<String, Map<String, String>> mapMapString) {
|
||||
this.mapMapString = mapMapString;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass putMapMapStringItem(String key, Map<String, String> mapMapStringItem) {
|
||||
if (this.mapMapString == null) {
|
||||
this.mapMapString = new HashMap<>();
|
||||
}
|
||||
this.mapMapString.put(key, mapMapStringItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get mapMapString
|
||||
* @return mapMapString
|
||||
**/
|
||||
@Valid
|
||||
public Map<String, Map<String, String>> getMapMapString() {
|
||||
return mapMapString;
|
||||
}
|
||||
|
||||
public void setMapMapString(Map<String, Map<String, String>> mapMapString) {
|
||||
this.mapMapString = mapMapString;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass mapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
|
||||
this.mapMapAnytype = mapMapAnytype;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map<String, Object> mapMapAnytypeItem) {
|
||||
if (this.mapMapAnytype == null) {
|
||||
this.mapMapAnytype = new HashMap<>();
|
||||
}
|
||||
this.mapMapAnytype.put(key, mapMapAnytypeItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get mapMapAnytype
|
||||
* @return mapMapAnytype
|
||||
**/
|
||||
@Valid
|
||||
public Map<String, Map<String, Object>> getMapMapAnytype() {
|
||||
return mapMapAnytype;
|
||||
}
|
||||
|
||||
public void setMapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
|
||||
this.mapMapAnytype = mapMapAnytype;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass anytype1(Object anytype1) {
|
||||
this.anytype1 = anytype1;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get anytype1
|
||||
* @return anytype1
|
||||
**/
|
||||
@Valid
|
||||
public Object getAnytype1() {
|
||||
return anytype1;
|
||||
}
|
||||
|
||||
public void setAnytype1(Object anytype1) {
|
||||
this.anytype1 = anytype1;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass anytype2(Object anytype2) {
|
||||
this.anytype2 = anytype2;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get anytype2
|
||||
* @return anytype2
|
||||
**/
|
||||
@Valid
|
||||
public Object getAnytype2() {
|
||||
return anytype2;
|
||||
}
|
||||
|
||||
public void setAnytype2(Object anytype2) {
|
||||
this.anytype2 = anytype2;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass anytype3(Object anytype3) {
|
||||
this.anytype3 = anytype3;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get anytype3
|
||||
* @return anytype3
|
||||
**/
|
||||
@Valid
|
||||
public Object getAnytype3() {
|
||||
return anytype3;
|
||||
}
|
||||
|
||||
public void setAnytype3(Object anytype3) {
|
||||
this.anytype3 = anytype3;
|
||||
}
|
||||
|
||||
|
||||
@ -81,13 +317,22 @@ public class AdditionalPropertiesClass {
|
||||
return false;
|
||||
}
|
||||
AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o;
|
||||
return Objects.equals(mapProperty, additionalPropertiesClass.mapProperty) &&
|
||||
Objects.equals(mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty);
|
||||
return Objects.equals(mapString, additionalPropertiesClass.mapString) &&
|
||||
Objects.equals(mapNumber, additionalPropertiesClass.mapNumber) &&
|
||||
Objects.equals(mapInteger, additionalPropertiesClass.mapInteger) &&
|
||||
Objects.equals(mapBoolean, additionalPropertiesClass.mapBoolean) &&
|
||||
Objects.equals(mapArrayInteger, additionalPropertiesClass.mapArrayInteger) &&
|
||||
Objects.equals(mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) &&
|
||||
Objects.equals(mapMapString, additionalPropertiesClass.mapMapString) &&
|
||||
Objects.equals(mapMapAnytype, additionalPropertiesClass.mapMapAnytype) &&
|
||||
Objects.equals(anytype1, additionalPropertiesClass.anytype1) &&
|
||||
Objects.equals(anytype2, additionalPropertiesClass.anytype2) &&
|
||||
Objects.equals(anytype3, additionalPropertiesClass.anytype3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(mapProperty, mapOfMapProperty);
|
||||
return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3);
|
||||
}
|
||||
|
||||
@SuppressWarnings("StringBufferReplaceableByString")
|
||||
@ -96,8 +341,17 @@ public class AdditionalPropertiesClass {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesClass {\n");
|
||||
|
||||
sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n");
|
||||
sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).append("\n");
|
||||
sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n");
|
||||
sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n");
|
||||
sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n");
|
||||
sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n");
|
||||
sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n");
|
||||
sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n");
|
||||
sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n");
|
||||
sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n");
|
||||
sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n");
|
||||
sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n");
|
||||
sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
@ -0,0 +1,77 @@
|
||||
package apimodels;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import java.util.Set;
|
||||
import javax.validation.*;
|
||||
import java.util.Objects;
|
||||
import javax.validation.constraints.*;
|
||||
/**
|
||||
* AdditionalPropertiesInteger
|
||||
*/
|
||||
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class AdditionalPropertiesInteger extends HashMap<String, Integer> {
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesInteger name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o;
|
||||
return Objects.equals(name, additionalPropertiesInteger.name) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
}
|
||||
|
||||
@SuppressWarnings("StringBufferReplaceableByString")
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesInteger {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,78 @@
|
||||
package apimodels;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import java.util.Set;
|
||||
import javax.validation.*;
|
||||
import java.util.Objects;
|
||||
import javax.validation.constraints.*;
|
||||
/**
|
||||
* AdditionalPropertiesNumber
|
||||
*/
|
||||
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> {
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesNumber name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o;
|
||||
return Objects.equals(name, additionalPropertiesNumber.name) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
}
|
||||
|
||||
@SuppressWarnings("StringBufferReplaceableByString")
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesNumber {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,77 @@
|
||||
package apimodels;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import java.util.Set;
|
||||
import javax.validation.*;
|
||||
import java.util.Objects;
|
||||
import javax.validation.constraints.*;
|
||||
/**
|
||||
* AdditionalPropertiesObject
|
||||
*/
|
||||
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class AdditionalPropertiesObject extends HashMap<String, Map> {
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesObject name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o;
|
||||
return Objects.equals(name, additionalPropertiesObject.name) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
}
|
||||
|
||||
@SuppressWarnings("StringBufferReplaceableByString")
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesObject {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,77 @@
|
||||
package apimodels;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import java.util.Set;
|
||||
import javax.validation.*;
|
||||
import java.util.Objects;
|
||||
import javax.validation.constraints.*;
|
||||
/**
|
||||
* AdditionalPropertiesString
|
||||
*/
|
||||
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class AdditionalPropertiesString extends HashMap<String, String> {
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesString name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o;
|
||||
return Objects.equals(name, additionalPropertiesString.name) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
}
|
||||
|
||||
@SuppressWarnings("StringBufferReplaceableByString")
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesString {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Animal {
|
||||
@JsonProperty("className")
|
||||
private String className = null;
|
||||
private String className;
|
||||
|
||||
@JsonProperty("color")
|
||||
private String color = "red";
|
||||
|
@ -12,22 +12,22 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Capitalization {
|
||||
@JsonProperty("smallCamel")
|
||||
private String smallCamel = null;
|
||||
private String smallCamel;
|
||||
|
||||
@JsonProperty("CapitalCamel")
|
||||
private String capitalCamel = null;
|
||||
private String capitalCamel;
|
||||
|
||||
@JsonProperty("small_Snake")
|
||||
private String smallSnake = null;
|
||||
private String smallSnake;
|
||||
|
||||
@JsonProperty("Capital_Snake")
|
||||
private String capitalSnake = null;
|
||||
private String capitalSnake;
|
||||
|
||||
@JsonProperty("SCA_ETH_Flow_Points")
|
||||
private String scAETHFlowPoints = null;
|
||||
private String scAETHFlowPoints;
|
||||
|
||||
@JsonProperty("ATT_NAME")
|
||||
private String ATT_NAME = null;
|
||||
private String ATT_NAME;
|
||||
|
||||
public Capitalization smallCamel(String smallCamel) {
|
||||
this.smallCamel = smallCamel;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package apimodels;
|
||||
|
||||
import apimodels.Animal;
|
||||
import apimodels.CatAllOf;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import java.util.Set;
|
||||
import javax.validation.*;
|
||||
@ -13,7 +14,7 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Cat extends Animal {
|
||||
@JsonProperty("declawed")
|
||||
private Boolean declawed = null;
|
||||
private Boolean declawed;
|
||||
|
||||
public Cat declawed(Boolean declawed) {
|
||||
this.declawed = declawed;
|
||||
|
@ -0,0 +1,74 @@
|
||||
package apimodels;
|
||||
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import java.util.Set;
|
||||
import javax.validation.*;
|
||||
import java.util.Objects;
|
||||
import javax.validation.constraints.*;
|
||||
/**
|
||||
* CatAllOf
|
||||
*/
|
||||
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class CatAllOf {
|
||||
@JsonProperty("declawed")
|
||||
private Boolean declawed;
|
||||
|
||||
public CatAllOf declawed(Boolean declawed) {
|
||||
this.declawed = declawed;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get declawed
|
||||
* @return declawed
|
||||
**/
|
||||
public Boolean getDeclawed() {
|
||||
return declawed;
|
||||
}
|
||||
|
||||
public void setDeclawed(Boolean declawed) {
|
||||
this.declawed = declawed;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CatAllOf catAllOf = (CatAllOf) o;
|
||||
return Objects.equals(declawed, catAllOf.declawed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(declawed);
|
||||
}
|
||||
|
||||
@SuppressWarnings("StringBufferReplaceableByString")
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class CatAllOf {\n");
|
||||
|
||||
sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
@ -12,10 +12,10 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Category {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
private String name = "default-name";
|
||||
|
||||
public Category id(Long id) {
|
||||
this.id = id;
|
||||
@ -43,7 +43,8 @@ public class Category {
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
public String getName() {
|
||||
@NotNull
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class ClassModel {
|
||||
@JsonProperty("_class")
|
||||
private String propertyClass = null;
|
||||
private String propertyClass;
|
||||
|
||||
public ClassModel propertyClass(String propertyClass) {
|
||||
this.propertyClass = propertyClass;
|
||||
|
@ -12,7 +12,7 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Client {
|
||||
@JsonProperty("client")
|
||||
private String client = null;
|
||||
private String client;
|
||||
|
||||
public Client client(String client) {
|
||||
this.client = client;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package apimodels;
|
||||
|
||||
import apimodels.Animal;
|
||||
import apimodels.DogAllOf;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import java.util.Set;
|
||||
import javax.validation.*;
|
||||
@ -13,7 +14,7 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Dog extends Animal {
|
||||
@JsonProperty("breed")
|
||||
private String breed = null;
|
||||
private String breed;
|
||||
|
||||
public Dog breed(String breed) {
|
||||
this.breed = breed;
|
||||
|
@ -0,0 +1,74 @@
|
||||
package apimodels;
|
||||
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import java.util.Set;
|
||||
import javax.validation.*;
|
||||
import java.util.Objects;
|
||||
import javax.validation.constraints.*;
|
||||
/**
|
||||
* DogAllOf
|
||||
*/
|
||||
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class DogAllOf {
|
||||
@JsonProperty("breed")
|
||||
private String breed;
|
||||
|
||||
public DogAllOf breed(String breed) {
|
||||
this.breed = breed;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get breed
|
||||
* @return breed
|
||||
**/
|
||||
public String getBreed() {
|
||||
return breed;
|
||||
}
|
||||
|
||||
public void setBreed(String breed) {
|
||||
this.breed = breed;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DogAllOf dogAllOf = (DogAllOf) o;
|
||||
return Objects.equals(breed, dogAllOf.breed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(breed);
|
||||
}
|
||||
|
||||
@SuppressWarnings("StringBufferReplaceableByString")
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class DogAllOf {\n");
|
||||
|
||||
sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
@ -34,18 +34,18 @@ public class EnumArrays {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static JustSymbolEnum fromValue(String text) {
|
||||
public static JustSymbolEnum fromValue(String value) {
|
||||
for (JustSymbolEnum b : JustSymbolEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@JsonProperty("just_symbol")
|
||||
private JustSymbolEnum justSymbol = null;
|
||||
private JustSymbolEnum justSymbol;
|
||||
|
||||
/**
|
||||
* Gets or Sets arrayEnum
|
||||
@ -68,13 +68,13 @@ public class EnumArrays {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static ArrayEnumEnum fromValue(String text) {
|
||||
public static ArrayEnumEnum fromValue(String value) {
|
||||
for (ArrayEnumEnum b : ArrayEnumEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,13 +29,13 @@ public enum EnumClass {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static EnumClass fromValue(String text) {
|
||||
public static EnumClass fromValue(String value) {
|
||||
for (EnumClass b : EnumClass.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,18 +35,18 @@ public class EnumTest {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static EnumStringEnum fromValue(String text) {
|
||||
public static EnumStringEnum fromValue(String value) {
|
||||
for (EnumStringEnum b : EnumStringEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@JsonProperty("enum_string")
|
||||
private EnumStringEnum enumString = null;
|
||||
private EnumStringEnum enumString;
|
||||
|
||||
/**
|
||||
* Gets or Sets enumStringRequired
|
||||
@ -71,18 +71,18 @@ public class EnumTest {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static EnumStringRequiredEnum fromValue(String text) {
|
||||
public static EnumStringRequiredEnum fromValue(String value) {
|
||||
for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@JsonProperty("enum_string_required")
|
||||
private EnumStringRequiredEnum enumStringRequired = null;
|
||||
private EnumStringRequiredEnum enumStringRequired;
|
||||
|
||||
/**
|
||||
* Gets or Sets enumInteger
|
||||
@ -105,18 +105,18 @@ public class EnumTest {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static EnumIntegerEnum fromValue(String text) {
|
||||
public static EnumIntegerEnum fromValue(Integer value) {
|
||||
for (EnumIntegerEnum b : EnumIntegerEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@JsonProperty("enum_integer")
|
||||
private EnumIntegerEnum enumInteger = null;
|
||||
private EnumIntegerEnum enumInteger;
|
||||
|
||||
/**
|
||||
* Gets or Sets enumNumber
|
||||
@ -139,21 +139,21 @@ public class EnumTest {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static EnumNumberEnum fromValue(String text) {
|
||||
public static EnumNumberEnum fromValue(Double value) {
|
||||
for (EnumNumberEnum b : EnumNumberEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@JsonProperty("enum_number")
|
||||
private EnumNumberEnum enumNumber = null;
|
||||
private EnumNumberEnum enumNumber;
|
||||
|
||||
@JsonProperty("outerEnum")
|
||||
private OuterEnum outerEnum = null;
|
||||
private OuterEnum outerEnum;
|
||||
|
||||
public EnumTest enumString(EnumStringEnum enumString) {
|
||||
this.enumString = enumString;
|
||||
|
@ -14,7 +14,7 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class FileSchemaTestClass {
|
||||
@JsonProperty("file")
|
||||
private java.io.File file = null;
|
||||
private java.io.File file;
|
||||
|
||||
@JsonProperty("files")
|
||||
private List<java.io.File> files = null;
|
||||
|
@ -17,43 +17,43 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class FormatTest {
|
||||
@JsonProperty("integer")
|
||||
private Integer integer = null;
|
||||
private Integer integer;
|
||||
|
||||
@JsonProperty("int32")
|
||||
private Integer int32 = null;
|
||||
private Integer int32;
|
||||
|
||||
@JsonProperty("int64")
|
||||
private Long int64 = null;
|
||||
private Long int64;
|
||||
|
||||
@JsonProperty("number")
|
||||
private BigDecimal number = null;
|
||||
private BigDecimal number;
|
||||
|
||||
@JsonProperty("float")
|
||||
private Float _float = null;
|
||||
private Float _float;
|
||||
|
||||
@JsonProperty("double")
|
||||
private Double _double = null;
|
||||
private Double _double;
|
||||
|
||||
@JsonProperty("string")
|
||||
private String string = null;
|
||||
private String string;
|
||||
|
||||
@JsonProperty("byte")
|
||||
private byte[] _byte = null;
|
||||
private byte[] _byte;
|
||||
|
||||
@JsonProperty("binary")
|
||||
private InputStream binary = null;
|
||||
private InputStream binary;
|
||||
|
||||
@JsonProperty("date")
|
||||
private LocalDate date = null;
|
||||
private LocalDate date;
|
||||
|
||||
@JsonProperty("dateTime")
|
||||
private OffsetDateTime dateTime = null;
|
||||
private OffsetDateTime dateTime;
|
||||
|
||||
@JsonProperty("uuid")
|
||||
private UUID uuid = null;
|
||||
private UUID uuid;
|
||||
|
||||
@JsonProperty("password")
|
||||
private String password = null;
|
||||
private String password;
|
||||
|
||||
public FormatTest integer(Integer integer) {
|
||||
this.integer = integer;
|
||||
|
@ -12,10 +12,10 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class HasOnlyReadOnly {
|
||||
@JsonProperty("bar")
|
||||
private String bar = null;
|
||||
private String bar;
|
||||
|
||||
@JsonProperty("foo")
|
||||
private String foo = null;
|
||||
private String foo;
|
||||
|
||||
public HasOnlyReadOnly bar(String bar) {
|
||||
this.bar = bar;
|
||||
|
@ -1,6 +1,5 @@
|
||||
package apimodels;
|
||||
|
||||
import apimodels.StringBooleanMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -39,13 +38,13 @@ public class MapTest {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static InnerEnum fromValue(String text) {
|
||||
public static InnerEnum fromValue(String value) {
|
||||
for (InnerEnum b : InnerEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -56,7 +55,7 @@ public class MapTest {
|
||||
private Map<String, Boolean> directMap = null;
|
||||
|
||||
@JsonProperty("indirect_map")
|
||||
private StringBooleanMap indirectMap = null;
|
||||
private Map<String, Boolean> indirectMap = null;
|
||||
|
||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||
this.mapMapOfString = mapMapOfString;
|
||||
@ -134,21 +133,28 @@ public class MapTest {
|
||||
this.directMap = directMap;
|
||||
}
|
||||
|
||||
public MapTest indirectMap(StringBooleanMap indirectMap) {
|
||||
public MapTest indirectMap(Map<String, Boolean> indirectMap) {
|
||||
this.indirectMap = indirectMap;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) {
|
||||
if (this.indirectMap == null) {
|
||||
this.indirectMap = new HashMap<>();
|
||||
}
|
||||
this.indirectMap.put(key, indirectMapItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get indirectMap
|
||||
* @return indirectMap
|
||||
**/
|
||||
@Valid
|
||||
public StringBooleanMap getIndirectMap() {
|
||||
public Map<String, Boolean> getIndirectMap() {
|
||||
return indirectMap;
|
||||
}
|
||||
|
||||
public void setIndirectMap(StringBooleanMap indirectMap) {
|
||||
public void setIndirectMap(Map<String, Boolean> indirectMap) {
|
||||
this.indirectMap = indirectMap;
|
||||
}
|
||||
|
||||
|
@ -18,10 +18,10 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
@JsonProperty("uuid")
|
||||
private UUID uuid = null;
|
||||
private UUID uuid;
|
||||
|
||||
@JsonProperty("dateTime")
|
||||
private OffsetDateTime dateTime = null;
|
||||
private OffsetDateTime dateTime;
|
||||
|
||||
@JsonProperty("map")
|
||||
private Map<String, Animal> map = null;
|
||||
|
@ -12,10 +12,10 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Model200Response {
|
||||
@JsonProperty("name")
|
||||
private Integer name = null;
|
||||
private Integer name;
|
||||
|
||||
@JsonProperty("class")
|
||||
private String propertyClass = null;
|
||||
private String propertyClass;
|
||||
|
||||
public Model200Response name(Integer name) {
|
||||
this.name = name;
|
||||
|
@ -12,13 +12,13 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class ModelApiResponse {
|
||||
@JsonProperty("code")
|
||||
private Integer code = null;
|
||||
private Integer code;
|
||||
|
||||
@JsonProperty("type")
|
||||
private String type = null;
|
||||
private String type;
|
||||
|
||||
@JsonProperty("message")
|
||||
private String message = null;
|
||||
private String message;
|
||||
|
||||
public ModelApiResponse code(Integer code) {
|
||||
this.code = code;
|
||||
|
@ -12,7 +12,7 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class ModelReturn {
|
||||
@JsonProperty("return")
|
||||
private Integer _return = null;
|
||||
private Integer _return;
|
||||
|
||||
public ModelReturn _return(Integer _return) {
|
||||
this._return = _return;
|
||||
|
@ -12,16 +12,16 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Name {
|
||||
@JsonProperty("name")
|
||||
private Integer name = null;
|
||||
private Integer name;
|
||||
|
||||
@JsonProperty("snake_case")
|
||||
private Integer snakeCase = null;
|
||||
private Integer snakeCase;
|
||||
|
||||
@JsonProperty("property")
|
||||
private String property = null;
|
||||
private String property;
|
||||
|
||||
@JsonProperty("123Number")
|
||||
private Integer _123number = null;
|
||||
private Integer _123number;
|
||||
|
||||
public Name name(Integer name) {
|
||||
this.name = name;
|
||||
|
@ -13,7 +13,7 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class NumberOnly {
|
||||
@JsonProperty("JustNumber")
|
||||
private BigDecimal justNumber = null;
|
||||
private BigDecimal justNumber;
|
||||
|
||||
public NumberOnly justNumber(BigDecimal justNumber) {
|
||||
this.justNumber = justNumber;
|
||||
|
@ -13,16 +13,16 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Order {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("petId")
|
||||
private Long petId = null;
|
||||
private Long petId;
|
||||
|
||||
@JsonProperty("quantity")
|
||||
private Integer quantity = null;
|
||||
private Integer quantity;
|
||||
|
||||
@JsonProperty("shipDate")
|
||||
private OffsetDateTime shipDate = null;
|
||||
private OffsetDateTime shipDate;
|
||||
|
||||
/**
|
||||
* Order Status
|
||||
@ -47,18 +47,18 @@ public class Order {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static StatusEnum fromValue(String text) {
|
||||
public static StatusEnum fromValue(String value) {
|
||||
for (StatusEnum b : StatusEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@JsonProperty("status")
|
||||
private StatusEnum status = null;
|
||||
private StatusEnum status;
|
||||
|
||||
@JsonProperty("complete")
|
||||
private Boolean complete = false;
|
||||
|
@ -13,13 +13,13 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class OuterComposite {
|
||||
@JsonProperty("my_number")
|
||||
private BigDecimal myNumber = null;
|
||||
private BigDecimal myNumber;
|
||||
|
||||
@JsonProperty("my_string")
|
||||
private String myString = null;
|
||||
private String myString;
|
||||
|
||||
@JsonProperty("my_boolean")
|
||||
private Boolean myBoolean = null;
|
||||
private Boolean myBoolean;
|
||||
|
||||
public OuterComposite myNumber(BigDecimal myNumber) {
|
||||
this.myNumber = myNumber;
|
||||
|
@ -29,13 +29,13 @@ public enum OuterEnum {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static OuterEnum fromValue(String text) {
|
||||
public static OuterEnum fromValue(String value) {
|
||||
for (OuterEnum b : OuterEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,13 +16,13 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Pet {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("category")
|
||||
private Category category = null;
|
||||
private Category category;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
private String name;
|
||||
|
||||
@JsonProperty("photoUrls")
|
||||
private List<String> photoUrls = new ArrayList<>();
|
||||
@ -53,18 +53,18 @@ public class Pet {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static StatusEnum fromValue(String text) {
|
||||
public static StatusEnum fromValue(String value) {
|
||||
for (StatusEnum b : StatusEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@JsonProperty("status")
|
||||
private StatusEnum status = null;
|
||||
private StatusEnum status;
|
||||
|
||||
public Pet id(Long id) {
|
||||
this.id = id;
|
||||
|
@ -12,10 +12,10 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class ReadOnlyFirst {
|
||||
@JsonProperty("bar")
|
||||
private String bar = null;
|
||||
private String bar;
|
||||
|
||||
@JsonProperty("baz")
|
||||
private String baz = null;
|
||||
private String baz;
|
||||
|
||||
public ReadOnlyFirst bar(String bar) {
|
||||
this.bar = bar;
|
||||
|
@ -12,7 +12,7 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class SpecialModelName {
|
||||
@JsonProperty("$special[property.name]")
|
||||
private Long $specialPropertyName = null;
|
||||
private Long $specialPropertyName;
|
||||
|
||||
public SpecialModelName $specialPropertyName(Long $specialPropertyName) {
|
||||
this.$specialPropertyName = $specialPropertyName;
|
||||
|
@ -12,10 +12,10 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class Tag {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
private String name;
|
||||
|
||||
public Tag id(Long id) {
|
||||
this.id = id;
|
||||
|
@ -0,0 +1,176 @@
|
||||
package apimodels;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import java.util.Set;
|
||||
import javax.validation.*;
|
||||
import java.util.Objects;
|
||||
import javax.validation.constraints.*;
|
||||
/**
|
||||
* TypeHolderDefault
|
||||
*/
|
||||
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class TypeHolderDefault {
|
||||
@JsonProperty("string_item")
|
||||
private String stringItem = "what";
|
||||
|
||||
@JsonProperty("number_item")
|
||||
private BigDecimal numberItem;
|
||||
|
||||
@JsonProperty("integer_item")
|
||||
private Integer integerItem;
|
||||
|
||||
@JsonProperty("bool_item")
|
||||
private Boolean boolItem = true;
|
||||
|
||||
@JsonProperty("array_item")
|
||||
private List<Integer> arrayItem = new ArrayList<>();
|
||||
|
||||
public TypeHolderDefault stringItem(String stringItem) {
|
||||
this.stringItem = stringItem;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get stringItem
|
||||
* @return stringItem
|
||||
**/
|
||||
@NotNull
|
||||
public String getStringItem() {
|
||||
return stringItem;
|
||||
}
|
||||
|
||||
public void setStringItem(String stringItem) {
|
||||
this.stringItem = stringItem;
|
||||
}
|
||||
|
||||
public TypeHolderDefault numberItem(BigDecimal numberItem) {
|
||||
this.numberItem = numberItem;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get numberItem
|
||||
* @return numberItem
|
||||
**/
|
||||
@NotNull
|
||||
@Valid
|
||||
public BigDecimal getNumberItem() {
|
||||
return numberItem;
|
||||
}
|
||||
|
||||
public void setNumberItem(BigDecimal numberItem) {
|
||||
this.numberItem = numberItem;
|
||||
}
|
||||
|
||||
public TypeHolderDefault integerItem(Integer integerItem) {
|
||||
this.integerItem = integerItem;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get integerItem
|
||||
* @return integerItem
|
||||
**/
|
||||
@NotNull
|
||||
public Integer getIntegerItem() {
|
||||
return integerItem;
|
||||
}
|
||||
|
||||
public void setIntegerItem(Integer integerItem) {
|
||||
this.integerItem = integerItem;
|
||||
}
|
||||
|
||||
public TypeHolderDefault boolItem(Boolean boolItem) {
|
||||
this.boolItem = boolItem;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get boolItem
|
||||
* @return boolItem
|
||||
**/
|
||||
@NotNull
|
||||
public Boolean getBoolItem() {
|
||||
return boolItem;
|
||||
}
|
||||
|
||||
public void setBoolItem(Boolean boolItem) {
|
||||
this.boolItem = boolItem;
|
||||
}
|
||||
|
||||
public TypeHolderDefault arrayItem(List<Integer> arrayItem) {
|
||||
this.arrayItem = arrayItem;
|
||||
return this;
|
||||
}
|
||||
|
||||
public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) {
|
||||
arrayItem.add(arrayItemItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get arrayItem
|
||||
* @return arrayItem
|
||||
**/
|
||||
@NotNull
|
||||
public List<Integer> getArrayItem() {
|
||||
return arrayItem;
|
||||
}
|
||||
|
||||
public void setArrayItem(List<Integer> arrayItem) {
|
||||
this.arrayItem = arrayItem;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o;
|
||||
return Objects.equals(stringItem, typeHolderDefault.stringItem) &&
|
||||
Objects.equals(numberItem, typeHolderDefault.numberItem) &&
|
||||
Objects.equals(integerItem, typeHolderDefault.integerItem) &&
|
||||
Objects.equals(boolItem, typeHolderDefault.boolItem) &&
|
||||
Objects.equals(arrayItem, typeHolderDefault.arrayItem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem);
|
||||
}
|
||||
|
||||
@SuppressWarnings("StringBufferReplaceableByString")
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class TypeHolderDefault {\n");
|
||||
|
||||
sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n");
|
||||
sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n");
|
||||
sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n");
|
||||
sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n");
|
||||
sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,176 @@
|
||||
package apimodels;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import java.util.Set;
|
||||
import javax.validation.*;
|
||||
import java.util.Objects;
|
||||
import javax.validation.constraints.*;
|
||||
/**
|
||||
* TypeHolderExample
|
||||
*/
|
||||
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class TypeHolderExample {
|
||||
@JsonProperty("string_item")
|
||||
private String stringItem;
|
||||
|
||||
@JsonProperty("number_item")
|
||||
private BigDecimal numberItem;
|
||||
|
||||
@JsonProperty("integer_item")
|
||||
private Integer integerItem;
|
||||
|
||||
@JsonProperty("bool_item")
|
||||
private Boolean boolItem;
|
||||
|
||||
@JsonProperty("array_item")
|
||||
private List<Integer> arrayItem = new ArrayList<>();
|
||||
|
||||
public TypeHolderExample stringItem(String stringItem) {
|
||||
this.stringItem = stringItem;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get stringItem
|
||||
* @return stringItem
|
||||
**/
|
||||
@NotNull
|
||||
public String getStringItem() {
|
||||
return stringItem;
|
||||
}
|
||||
|
||||
public void setStringItem(String stringItem) {
|
||||
this.stringItem = stringItem;
|
||||
}
|
||||
|
||||
public TypeHolderExample numberItem(BigDecimal numberItem) {
|
||||
this.numberItem = numberItem;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get numberItem
|
||||
* @return numberItem
|
||||
**/
|
||||
@NotNull
|
||||
@Valid
|
||||
public BigDecimal getNumberItem() {
|
||||
return numberItem;
|
||||
}
|
||||
|
||||
public void setNumberItem(BigDecimal numberItem) {
|
||||
this.numberItem = numberItem;
|
||||
}
|
||||
|
||||
public TypeHolderExample integerItem(Integer integerItem) {
|
||||
this.integerItem = integerItem;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get integerItem
|
||||
* @return integerItem
|
||||
**/
|
||||
@NotNull
|
||||
public Integer getIntegerItem() {
|
||||
return integerItem;
|
||||
}
|
||||
|
||||
public void setIntegerItem(Integer integerItem) {
|
||||
this.integerItem = integerItem;
|
||||
}
|
||||
|
||||
public TypeHolderExample boolItem(Boolean boolItem) {
|
||||
this.boolItem = boolItem;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get boolItem
|
||||
* @return boolItem
|
||||
**/
|
||||
@NotNull
|
||||
public Boolean getBoolItem() {
|
||||
return boolItem;
|
||||
}
|
||||
|
||||
public void setBoolItem(Boolean boolItem) {
|
||||
this.boolItem = boolItem;
|
||||
}
|
||||
|
||||
public TypeHolderExample arrayItem(List<Integer> arrayItem) {
|
||||
this.arrayItem = arrayItem;
|
||||
return this;
|
||||
}
|
||||
|
||||
public TypeHolderExample addArrayItemItem(Integer arrayItemItem) {
|
||||
arrayItem.add(arrayItemItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get arrayItem
|
||||
* @return arrayItem
|
||||
**/
|
||||
@NotNull
|
||||
public List<Integer> getArrayItem() {
|
||||
return arrayItem;
|
||||
}
|
||||
|
||||
public void setArrayItem(List<Integer> arrayItem) {
|
||||
this.arrayItem = arrayItem;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
TypeHolderExample typeHolderExample = (TypeHolderExample) o;
|
||||
return Objects.equals(stringItem, typeHolderExample.stringItem) &&
|
||||
Objects.equals(numberItem, typeHolderExample.numberItem) &&
|
||||
Objects.equals(integerItem, typeHolderExample.integerItem) &&
|
||||
Objects.equals(boolItem, typeHolderExample.boolItem) &&
|
||||
Objects.equals(arrayItem, typeHolderExample.arrayItem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem);
|
||||
}
|
||||
|
||||
@SuppressWarnings("StringBufferReplaceableByString")
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class TypeHolderExample {\n");
|
||||
|
||||
sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n");
|
||||
sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n");
|
||||
sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n");
|
||||
sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n");
|
||||
sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
@ -12,28 +12,28 @@ import javax.validation.constraints.*;
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class User {
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("username")
|
||||
private String username = null;
|
||||
private String username;
|
||||
|
||||
@JsonProperty("firstName")
|
||||
private String firstName = null;
|
||||
private String firstName;
|
||||
|
||||
@JsonProperty("lastName")
|
||||
private String lastName = null;
|
||||
private String lastName;
|
||||
|
||||
@JsonProperty("email")
|
||||
private String email = null;
|
||||
private String email;
|
||||
|
||||
@JsonProperty("password")
|
||||
private String password = null;
|
||||
private String password;
|
||||
|
||||
@JsonProperty("phone")
|
||||
private String phone = null;
|
||||
private String phone;
|
||||
|
||||
@JsonProperty("userStatus")
|
||||
private Integer userStatus = null;
|
||||
private Integer userStatus;
|
||||
|
||||
public User id(Long id) {
|
||||
this.id = id;
|
||||
|
@ -0,0 +1,770 @@
|
||||
package apimodels;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import java.util.Set;
|
||||
import javax.validation.*;
|
||||
import java.util.Objects;
|
||||
import javax.validation.constraints.*;
|
||||
/**
|
||||
* XmlItem
|
||||
*/
|
||||
|
||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||
public class XmlItem {
|
||||
@JsonProperty("attribute_string")
|
||||
private String attributeString;
|
||||
|
||||
@JsonProperty("attribute_number")
|
||||
private BigDecimal attributeNumber;
|
||||
|
||||
@JsonProperty("attribute_integer")
|
||||
private Integer attributeInteger;
|
||||
|
||||
@JsonProperty("attribute_boolean")
|
||||
private Boolean attributeBoolean;
|
||||
|
||||
@JsonProperty("wrapped_array")
|
||||
private List<Integer> wrappedArray = null;
|
||||
|
||||
@JsonProperty("name_string")
|
||||
private String nameString;
|
||||
|
||||
@JsonProperty("name_number")
|
||||
private BigDecimal nameNumber;
|
||||
|
||||
@JsonProperty("name_integer")
|
||||
private Integer nameInteger;
|
||||
|
||||
@JsonProperty("name_boolean")
|
||||
private Boolean nameBoolean;
|
||||
|
||||
@JsonProperty("name_array")
|
||||
private List<Integer> nameArray = null;
|
||||
|
||||
@JsonProperty("name_wrapped_array")
|
||||
private List<Integer> nameWrappedArray = null;
|
||||
|
||||
@JsonProperty("prefix_string")
|
||||
private String prefixString;
|
||||
|
||||
@JsonProperty("prefix_number")
|
||||
private BigDecimal prefixNumber;
|
||||
|
||||
@JsonProperty("prefix_integer")
|
||||
private Integer prefixInteger;
|
||||
|
||||
@JsonProperty("prefix_boolean")
|
||||
private Boolean prefixBoolean;
|
||||
|
||||
@JsonProperty("prefix_array")
|
||||
private List<Integer> prefixArray = null;
|
||||
|
||||
@JsonProperty("prefix_wrapped_array")
|
||||
private List<Integer> prefixWrappedArray = null;
|
||||
|
||||
@JsonProperty("namespace_string")
|
||||
private String namespaceString;
|
||||
|
||||
@JsonProperty("namespace_number")
|
||||
private BigDecimal namespaceNumber;
|
||||
|
||||
@JsonProperty("namespace_integer")
|
||||
private Integer namespaceInteger;
|
||||
|
||||
@JsonProperty("namespace_boolean")
|
||||
private Boolean namespaceBoolean;
|
||||
|
||||
@JsonProperty("namespace_array")
|
||||
private List<Integer> namespaceArray = null;
|
||||
|
||||
@JsonProperty("namespace_wrapped_array")
|
||||
private List<Integer> namespaceWrappedArray = null;
|
||||
|
||||
@JsonProperty("prefix_ns_string")
|
||||
private String prefixNsString;
|
||||
|
||||
@JsonProperty("prefix_ns_number")
|
||||
private BigDecimal prefixNsNumber;
|
||||
|
||||
@JsonProperty("prefix_ns_integer")
|
||||
private Integer prefixNsInteger;
|
||||
|
||||
@JsonProperty("prefix_ns_boolean")
|
||||
private Boolean prefixNsBoolean;
|
||||
|
||||
@JsonProperty("prefix_ns_array")
|
||||
private List<Integer> prefixNsArray = null;
|
||||
|
||||
@JsonProperty("prefix_ns_wrapped_array")
|
||||
private List<Integer> prefixNsWrappedArray = null;
|
||||
|
||||
public XmlItem attributeString(String attributeString) {
|
||||
this.attributeString = attributeString;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get attributeString
|
||||
* @return attributeString
|
||||
**/
|
||||
public String getAttributeString() {
|
||||
return attributeString;
|
||||
}
|
||||
|
||||
public void setAttributeString(String attributeString) {
|
||||
this.attributeString = attributeString;
|
||||
}
|
||||
|
||||
public XmlItem attributeNumber(BigDecimal attributeNumber) {
|
||||
this.attributeNumber = attributeNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get attributeNumber
|
||||
* @return attributeNumber
|
||||
**/
|
||||
@Valid
|
||||
public BigDecimal getAttributeNumber() {
|
||||
return attributeNumber;
|
||||
}
|
||||
|
||||
public void setAttributeNumber(BigDecimal attributeNumber) {
|
||||
this.attributeNumber = attributeNumber;
|
||||
}
|
||||
|
||||
public XmlItem attributeInteger(Integer attributeInteger) {
|
||||
this.attributeInteger = attributeInteger;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get attributeInteger
|
||||
* @return attributeInteger
|
||||
**/
|
||||
public Integer getAttributeInteger() {
|
||||
return attributeInteger;
|
||||
}
|
||||
|
||||
public void setAttributeInteger(Integer attributeInteger) {
|
||||
this.attributeInteger = attributeInteger;
|
||||
}
|
||||
|
||||
public XmlItem attributeBoolean(Boolean attributeBoolean) {
|
||||
this.attributeBoolean = attributeBoolean;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get attributeBoolean
|
||||
* @return attributeBoolean
|
||||
**/
|
||||
public Boolean getAttributeBoolean() {
|
||||
return attributeBoolean;
|
||||
}
|
||||
|
||||
public void setAttributeBoolean(Boolean attributeBoolean) {
|
||||
this.attributeBoolean = attributeBoolean;
|
||||
}
|
||||
|
||||
public XmlItem wrappedArray(List<Integer> wrappedArray) {
|
||||
this.wrappedArray = wrappedArray;
|
||||
return this;
|
||||
}
|
||||
|
||||
public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) {
|
||||
if (wrappedArray == null) {
|
||||
wrappedArray = new ArrayList<>();
|
||||
}
|
||||
wrappedArray.add(wrappedArrayItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get wrappedArray
|
||||
* @return wrappedArray
|
||||
**/
|
||||
public List<Integer> getWrappedArray() {
|
||||
return wrappedArray;
|
||||
}
|
||||
|
||||
public void setWrappedArray(List<Integer> wrappedArray) {
|
||||
this.wrappedArray = wrappedArray;
|
||||
}
|
||||
|
||||
public XmlItem nameString(String nameString) {
|
||||
this.nameString = nameString;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get nameString
|
||||
* @return nameString
|
||||
**/
|
||||
public String getNameString() {
|
||||
return nameString;
|
||||
}
|
||||
|
||||
public void setNameString(String nameString) {
|
||||
this.nameString = nameString;
|
||||
}
|
||||
|
||||
public XmlItem nameNumber(BigDecimal nameNumber) {
|
||||
this.nameNumber = nameNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get nameNumber
|
||||
* @return nameNumber
|
||||
**/
|
||||
@Valid
|
||||
public BigDecimal getNameNumber() {
|
||||
return nameNumber;
|
||||
}
|
||||
|
||||
public void setNameNumber(BigDecimal nameNumber) {
|
||||
this.nameNumber = nameNumber;
|
||||
}
|
||||
|
||||
public XmlItem nameInteger(Integer nameInteger) {
|
||||
this.nameInteger = nameInteger;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get nameInteger
|
||||
* @return nameInteger
|
||||
**/
|
||||
public Integer getNameInteger() {
|
||||
return nameInteger;
|
||||
}
|
||||
|
||||
public void setNameInteger(Integer nameInteger) {
|
||||
this.nameInteger = nameInteger;
|
||||
}
|
||||
|
||||
public XmlItem nameBoolean(Boolean nameBoolean) {
|
||||
this.nameBoolean = nameBoolean;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get nameBoolean
|
||||
* @return nameBoolean
|
||||
**/
|
||||
public Boolean getNameBoolean() {
|
||||
return nameBoolean;
|
||||
}
|
||||
|
||||
public void setNameBoolean(Boolean nameBoolean) {
|
||||
this.nameBoolean = nameBoolean;
|
||||
}
|
||||
|
||||
public XmlItem nameArray(List<Integer> nameArray) {
|
||||
this.nameArray = nameArray;
|
||||
return this;
|
||||
}
|
||||
|
||||
public XmlItem addNameArrayItem(Integer nameArrayItem) {
|
||||
if (nameArray == null) {
|
||||
nameArray = new ArrayList<>();
|
||||
}
|
||||
nameArray.add(nameArrayItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get nameArray
|
||||
* @return nameArray
|
||||
**/
|
||||
public List<Integer> getNameArray() {
|
||||
return nameArray;
|
||||
}
|
||||
|
||||
public void setNameArray(List<Integer> nameArray) {
|
||||
this.nameArray = nameArray;
|
||||
}
|
||||
|
||||
public XmlItem nameWrappedArray(List<Integer> nameWrappedArray) {
|
||||
this.nameWrappedArray = nameWrappedArray;
|
||||
return this;
|
||||
}
|
||||
|
||||
public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) {
|
||||
if (nameWrappedArray == null) {
|
||||
nameWrappedArray = new ArrayList<>();
|
||||
}
|
||||
nameWrappedArray.add(nameWrappedArrayItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get nameWrappedArray
|
||||
* @return nameWrappedArray
|
||||
**/
|
||||
public List<Integer> getNameWrappedArray() {
|
||||
return nameWrappedArray;
|
||||
}
|
||||
|
||||
public void setNameWrappedArray(List<Integer> nameWrappedArray) {
|
||||
this.nameWrappedArray = nameWrappedArray;
|
||||
}
|
||||
|
||||
public XmlItem prefixString(String prefixString) {
|
||||
this.prefixString = prefixString;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get prefixString
|
||||
* @return prefixString
|
||||
**/
|
||||
public String getPrefixString() {
|
||||
return prefixString;
|
||||
}
|
||||
|
||||
public void setPrefixString(String prefixString) {
|
||||
this.prefixString = prefixString;
|
||||
}
|
||||
|
||||
public XmlItem prefixNumber(BigDecimal prefixNumber) {
|
||||
this.prefixNumber = prefixNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get prefixNumber
|
||||
* @return prefixNumber
|
||||
**/
|
||||
@Valid
|
||||
public BigDecimal getPrefixNumber() {
|
||||
return prefixNumber;
|
||||
}
|
||||
|
||||
public void setPrefixNumber(BigDecimal prefixNumber) {
|
||||
this.prefixNumber = prefixNumber;
|
||||
}
|
||||
|
||||
public XmlItem prefixInteger(Integer prefixInteger) {
|
||||
this.prefixInteger = prefixInteger;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get prefixInteger
|
||||
* @return prefixInteger
|
||||
**/
|
||||
public Integer getPrefixInteger() {
|
||||
return prefixInteger;
|
||||
}
|
||||
|
||||
public void setPrefixInteger(Integer prefixInteger) {
|
||||
this.prefixInteger = prefixInteger;
|
||||
}
|
||||
|
||||
public XmlItem prefixBoolean(Boolean prefixBoolean) {
|
||||
this.prefixBoolean = prefixBoolean;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get prefixBoolean
|
||||
* @return prefixBoolean
|
||||
**/
|
||||
public Boolean getPrefixBoolean() {
|
||||
return prefixBoolean;
|
||||
}
|
||||
|
||||
public void setPrefixBoolean(Boolean prefixBoolean) {
|
||||
this.prefixBoolean = prefixBoolean;
|
||||
}
|
||||
|
||||
public XmlItem prefixArray(List<Integer> prefixArray) {
|
||||
this.prefixArray = prefixArray;
|
||||
return this;
|
||||
}
|
||||
|
||||
public XmlItem addPrefixArrayItem(Integer prefixArrayItem) {
|
||||
if (prefixArray == null) {
|
||||
prefixArray = new ArrayList<>();
|
||||
}
|
||||
prefixArray.add(prefixArrayItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get prefixArray
|
||||
* @return prefixArray
|
||||
**/
|
||||
public List<Integer> getPrefixArray() {
|
||||
return prefixArray;
|
||||
}
|
||||
|
||||
public void setPrefixArray(List<Integer> prefixArray) {
|
||||
this.prefixArray = prefixArray;
|
||||
}
|
||||
|
||||
public XmlItem prefixWrappedArray(List<Integer> prefixWrappedArray) {
|
||||
this.prefixWrappedArray = prefixWrappedArray;
|
||||
return this;
|
||||
}
|
||||
|
||||
public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) {
|
||||
if (prefixWrappedArray == null) {
|
||||
prefixWrappedArray = new ArrayList<>();
|
||||
}
|
||||
prefixWrappedArray.add(prefixWrappedArrayItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get prefixWrappedArray
|
||||
* @return prefixWrappedArray
|
||||
**/
|
||||
public List<Integer> getPrefixWrappedArray() {
|
||||
return prefixWrappedArray;
|
||||
}
|
||||
|
||||
public void setPrefixWrappedArray(List<Integer> prefixWrappedArray) {
|
||||
this.prefixWrappedArray = prefixWrappedArray;
|
||||
}
|
||||
|
||||
public XmlItem namespaceString(String namespaceString) {
|
||||
this.namespaceString = namespaceString;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get namespaceString
|
||||
* @return namespaceString
|
||||
**/
|
||||
public String getNamespaceString() {
|
||||
return namespaceString;
|
||||
}
|
||||
|
||||
public void setNamespaceString(String namespaceString) {
|
||||
this.namespaceString = namespaceString;
|
||||
}
|
||||
|
||||
public XmlItem namespaceNumber(BigDecimal namespaceNumber) {
|
||||
this.namespaceNumber = namespaceNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get namespaceNumber
|
||||
* @return namespaceNumber
|
||||
**/
|
||||
@Valid
|
||||
public BigDecimal getNamespaceNumber() {
|
||||
return namespaceNumber;
|
||||
}
|
||||
|
||||
public void setNamespaceNumber(BigDecimal namespaceNumber) {
|
||||
this.namespaceNumber = namespaceNumber;
|
||||
}
|
||||
|
||||
public XmlItem namespaceInteger(Integer namespaceInteger) {
|
||||
this.namespaceInteger = namespaceInteger;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get namespaceInteger
|
||||
* @return namespaceInteger
|
||||
**/
|
||||
public Integer getNamespaceInteger() {
|
||||
return namespaceInteger;
|
||||
}
|
||||
|
||||
public void setNamespaceInteger(Integer namespaceInteger) {
|
||||
this.namespaceInteger = namespaceInteger;
|
||||
}
|
||||
|
||||
public XmlItem namespaceBoolean(Boolean namespaceBoolean) {
|
||||
this.namespaceBoolean = namespaceBoolean;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get namespaceBoolean
|
||||
* @return namespaceBoolean
|
||||
**/
|
||||
public Boolean getNamespaceBoolean() {
|
||||
return namespaceBoolean;
|
||||
}
|
||||
|
||||
public void setNamespaceBoolean(Boolean namespaceBoolean) {
|
||||
this.namespaceBoolean = namespaceBoolean;
|
||||
}
|
||||
|
||||
public XmlItem namespaceArray(List<Integer> namespaceArray) {
|
||||
this.namespaceArray = namespaceArray;
|
||||
return this;
|
||||
}
|
||||
|
||||
public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) {
|
||||
if (namespaceArray == null) {
|
||||
namespaceArray = new ArrayList<>();
|
||||
}
|
||||
namespaceArray.add(namespaceArrayItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get namespaceArray
|
||||
* @return namespaceArray
|
||||
**/
|
||||
public List<Integer> getNamespaceArray() {
|
||||
return namespaceArray;
|
||||
}
|
||||
|
||||
public void setNamespaceArray(List<Integer> namespaceArray) {
|
||||
this.namespaceArray = namespaceArray;
|
||||
}
|
||||
|
||||
public XmlItem namespaceWrappedArray(List<Integer> namespaceWrappedArray) {
|
||||
this.namespaceWrappedArray = namespaceWrappedArray;
|
||||
return this;
|
||||
}
|
||||
|
||||
public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) {
|
||||
if (namespaceWrappedArray == null) {
|
||||
namespaceWrappedArray = new ArrayList<>();
|
||||
}
|
||||
namespaceWrappedArray.add(namespaceWrappedArrayItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get namespaceWrappedArray
|
||||
* @return namespaceWrappedArray
|
||||
**/
|
||||
public List<Integer> getNamespaceWrappedArray() {
|
||||
return namespaceWrappedArray;
|
||||
}
|
||||
|
||||
public void setNamespaceWrappedArray(List<Integer> namespaceWrappedArray) {
|
||||
this.namespaceWrappedArray = namespaceWrappedArray;
|
||||
}
|
||||
|
||||
public XmlItem prefixNsString(String prefixNsString) {
|
||||
this.prefixNsString = prefixNsString;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get prefixNsString
|
||||
* @return prefixNsString
|
||||
**/
|
||||
public String getPrefixNsString() {
|
||||
return prefixNsString;
|
||||
}
|
||||
|
||||
public void setPrefixNsString(String prefixNsString) {
|
||||
this.prefixNsString = prefixNsString;
|
||||
}
|
||||
|
||||
public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) {
|
||||
this.prefixNsNumber = prefixNsNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get prefixNsNumber
|
||||
* @return prefixNsNumber
|
||||
**/
|
||||
@Valid
|
||||
public BigDecimal getPrefixNsNumber() {
|
||||
return prefixNsNumber;
|
||||
}
|
||||
|
||||
public void setPrefixNsNumber(BigDecimal prefixNsNumber) {
|
||||
this.prefixNsNumber = prefixNsNumber;
|
||||
}
|
||||
|
||||
public XmlItem prefixNsInteger(Integer prefixNsInteger) {
|
||||
this.prefixNsInteger = prefixNsInteger;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get prefixNsInteger
|
||||
* @return prefixNsInteger
|
||||
**/
|
||||
public Integer getPrefixNsInteger() {
|
||||
return prefixNsInteger;
|
||||
}
|
||||
|
||||
public void setPrefixNsInteger(Integer prefixNsInteger) {
|
||||
this.prefixNsInteger = prefixNsInteger;
|
||||
}
|
||||
|
||||
public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) {
|
||||
this.prefixNsBoolean = prefixNsBoolean;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get prefixNsBoolean
|
||||
* @return prefixNsBoolean
|
||||
**/
|
||||
public Boolean getPrefixNsBoolean() {
|
||||
return prefixNsBoolean;
|
||||
}
|
||||
|
||||
public void setPrefixNsBoolean(Boolean prefixNsBoolean) {
|
||||
this.prefixNsBoolean = prefixNsBoolean;
|
||||
}
|
||||
|
||||
public XmlItem prefixNsArray(List<Integer> prefixNsArray) {
|
||||
this.prefixNsArray = prefixNsArray;
|
||||
return this;
|
||||
}
|
||||
|
||||
public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) {
|
||||
if (prefixNsArray == null) {
|
||||
prefixNsArray = new ArrayList<>();
|
||||
}
|
||||
prefixNsArray.add(prefixNsArrayItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get prefixNsArray
|
||||
* @return prefixNsArray
|
||||
**/
|
||||
public List<Integer> getPrefixNsArray() {
|
||||
return prefixNsArray;
|
||||
}
|
||||
|
||||
public void setPrefixNsArray(List<Integer> prefixNsArray) {
|
||||
this.prefixNsArray = prefixNsArray;
|
||||
}
|
||||
|
||||
public XmlItem prefixNsWrappedArray(List<Integer> prefixNsWrappedArray) {
|
||||
this.prefixNsWrappedArray = prefixNsWrappedArray;
|
||||
return this;
|
||||
}
|
||||
|
||||
public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) {
|
||||
if (prefixNsWrappedArray == null) {
|
||||
prefixNsWrappedArray = new ArrayList<>();
|
||||
}
|
||||
prefixNsWrappedArray.add(prefixNsWrappedArrayItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get prefixNsWrappedArray
|
||||
* @return prefixNsWrappedArray
|
||||
**/
|
||||
public List<Integer> getPrefixNsWrappedArray() {
|
||||
return prefixNsWrappedArray;
|
||||
}
|
||||
|
||||
public void setPrefixNsWrappedArray(List<Integer> prefixNsWrappedArray) {
|
||||
this.prefixNsWrappedArray = prefixNsWrappedArray;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
XmlItem xmlItem = (XmlItem) o;
|
||||
return Objects.equals(attributeString, xmlItem.attributeString) &&
|
||||
Objects.equals(attributeNumber, xmlItem.attributeNumber) &&
|
||||
Objects.equals(attributeInteger, xmlItem.attributeInteger) &&
|
||||
Objects.equals(attributeBoolean, xmlItem.attributeBoolean) &&
|
||||
Objects.equals(wrappedArray, xmlItem.wrappedArray) &&
|
||||
Objects.equals(nameString, xmlItem.nameString) &&
|
||||
Objects.equals(nameNumber, xmlItem.nameNumber) &&
|
||||
Objects.equals(nameInteger, xmlItem.nameInteger) &&
|
||||
Objects.equals(nameBoolean, xmlItem.nameBoolean) &&
|
||||
Objects.equals(nameArray, xmlItem.nameArray) &&
|
||||
Objects.equals(nameWrappedArray, xmlItem.nameWrappedArray) &&
|
||||
Objects.equals(prefixString, xmlItem.prefixString) &&
|
||||
Objects.equals(prefixNumber, xmlItem.prefixNumber) &&
|
||||
Objects.equals(prefixInteger, xmlItem.prefixInteger) &&
|
||||
Objects.equals(prefixBoolean, xmlItem.prefixBoolean) &&
|
||||
Objects.equals(prefixArray, xmlItem.prefixArray) &&
|
||||
Objects.equals(prefixWrappedArray, xmlItem.prefixWrappedArray) &&
|
||||
Objects.equals(namespaceString, xmlItem.namespaceString) &&
|
||||
Objects.equals(namespaceNumber, xmlItem.namespaceNumber) &&
|
||||
Objects.equals(namespaceInteger, xmlItem.namespaceInteger) &&
|
||||
Objects.equals(namespaceBoolean, xmlItem.namespaceBoolean) &&
|
||||
Objects.equals(namespaceArray, xmlItem.namespaceArray) &&
|
||||
Objects.equals(namespaceWrappedArray, xmlItem.namespaceWrappedArray) &&
|
||||
Objects.equals(prefixNsString, xmlItem.prefixNsString) &&
|
||||
Objects.equals(prefixNsNumber, xmlItem.prefixNsNumber) &&
|
||||
Objects.equals(prefixNsInteger, xmlItem.prefixNsInteger) &&
|
||||
Objects.equals(prefixNsBoolean, xmlItem.prefixNsBoolean) &&
|
||||
Objects.equals(prefixNsArray, xmlItem.prefixNsArray) &&
|
||||
Objects.equals(prefixNsWrappedArray, xmlItem.prefixNsWrappedArray);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray);
|
||||
}
|
||||
|
||||
@SuppressWarnings("StringBufferReplaceableByString")
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class XmlItem {\n");
|
||||
|
||||
sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n");
|
||||
sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n");
|
||||
sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n");
|
||||
sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n");
|
||||
sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n");
|
||||
sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n");
|
||||
sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n");
|
||||
sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n");
|
||||
sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n");
|
||||
sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n");
|
||||
sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n");
|
||||
sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n");
|
||||
sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n");
|
||||
sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n");
|
||||
sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n");
|
||||
sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n");
|
||||
sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n");
|
||||
sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n");
|
||||
sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n");
|
||||
sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n");
|
||||
sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n");
|
||||
sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n");
|
||||
sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n");
|
||||
sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n");
|
||||
sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n");
|
||||
sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n");
|
||||
sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n");
|
||||
sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n");
|
||||
sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
@ -36,18 +36,18 @@ public class AnotherFakeApiController extends Controller {
|
||||
|
||||
|
||||
@ApiAction
|
||||
public Result testSpecialTags() throws Exception {
|
||||
JsonNode nodeclient = request().body().asJson();
|
||||
Client client;
|
||||
if (nodeclient != null) {
|
||||
client = mapper.readValue(nodeclient.toString(), Client.class);
|
||||
public Result call123testSpecialTags() throws Exception {
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
Client body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), Client.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(client);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'Client' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
Client obj = imp.testSpecialTags(client);
|
||||
Client obj = imp.call123testSpecialTags(body);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import javax.validation.constraints.*;
|
||||
|
||||
public class AnotherFakeApiControllerImp implements AnotherFakeApiControllerImpInterface {
|
||||
@Override
|
||||
public Client testSpecialTags(Client client) throws Exception {
|
||||
public Client call123testSpecialTags(Client body) throws Exception {
|
||||
//Do your magic!!!
|
||||
return new Client();
|
||||
}
|
||||
|
@ -11,6 +11,6 @@ import javax.validation.constraints.*;
|
||||
|
||||
@SuppressWarnings("RedundantThrows")
|
||||
public interface AnotherFakeApiControllerImpInterface {
|
||||
Client testSpecialTags(Client client) throws Exception;
|
||||
Client call123testSpecialTags(Client body) throws Exception;
|
||||
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import java.util.Map;
|
||||
import java.time.OffsetDateTime;
|
||||
import apimodels.OuterComposite;
|
||||
import apimodels.User;
|
||||
import apimodels.XmlItem;
|
||||
|
||||
import play.mvc.Controller;
|
||||
import play.mvc.Result;
|
||||
@ -43,6 +44,22 @@ public class FakeApiController extends Controller {
|
||||
}
|
||||
|
||||
|
||||
@ApiAction
|
||||
public Result createXmlItem() throws Exception {
|
||||
JsonNode nodexmlItem = request().body().asJson();
|
||||
XmlItem xmlItem;
|
||||
if (nodexmlItem != null) {
|
||||
xmlItem = mapper.readValue(nodexmlItem.toString(), XmlItem.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(xmlItem);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'XmlItem' parameter is required");
|
||||
}
|
||||
imp.createXmlItem(xmlItem);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result fakeOuterBooleanSerialize() throws Exception {
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
@ -62,17 +79,17 @@ public class FakeApiController extends Controller {
|
||||
|
||||
@ApiAction
|
||||
public Result fakeOuterCompositeSerialize() throws Exception {
|
||||
JsonNode nodeouterComposite = request().body().asJson();
|
||||
OuterComposite outerComposite;
|
||||
if (nodeouterComposite != null) {
|
||||
outerComposite = mapper.readValue(nodeouterComposite.toString(), OuterComposite.class);
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
OuterComposite body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), OuterComposite.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(outerComposite);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
outerComposite = null;
|
||||
body = null;
|
||||
}
|
||||
OuterComposite obj = imp.fakeOuterCompositeSerialize(outerComposite);
|
||||
OuterComposite obj = imp.fakeOuterCompositeSerialize(body);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
@ -119,31 +136,31 @@ public class FakeApiController extends Controller {
|
||||
|
||||
@ApiAction
|
||||
public Result testBodyWithFileSchema() throws Exception {
|
||||
JsonNode nodefileSchemaTestClass = request().body().asJson();
|
||||
FileSchemaTestClass fileSchemaTestClass;
|
||||
if (nodefileSchemaTestClass != null) {
|
||||
fileSchemaTestClass = mapper.readValue(nodefileSchemaTestClass.toString(), FileSchemaTestClass.class);
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
FileSchemaTestClass body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), FileSchemaTestClass.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(fileSchemaTestClass);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'FileSchemaTestClass' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
imp.testBodyWithFileSchema(fileSchemaTestClass);
|
||||
imp.testBodyWithFileSchema(body);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result testBodyWithQueryParams() throws Exception {
|
||||
JsonNode nodeuser = request().body().asJson();
|
||||
User user;
|
||||
if (nodeuser != null) {
|
||||
user = mapper.readValue(nodeuser.toString(), User.class);
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
User body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), User.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(user);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'User' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
String valuequery = request().getQueryString("query");
|
||||
String query;
|
||||
@ -152,23 +169,23 @@ public class FakeApiController extends Controller {
|
||||
} else {
|
||||
throw new IllegalArgumentException("'query' parameter is required");
|
||||
}
|
||||
imp.testBodyWithQueryParams(query, user);
|
||||
imp.testBodyWithQueryParams(query, body);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result testClientModel() throws Exception {
|
||||
JsonNode nodeclient = request().body().asJson();
|
||||
Client client;
|
||||
if (nodeclient != null) {
|
||||
client = mapper.readValue(nodeclient.toString(), Client.class);
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
Client body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), Client.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(client);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'Client' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
Client obj = imp.testClientModel(client);
|
||||
Client obj = imp.testClientModel(body);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
@ -225,7 +242,7 @@ public class FakeApiController extends Controller {
|
||||
if (valuestring != null) {
|
||||
string = valuestring;
|
||||
} else {
|
||||
string = "null";
|
||||
string = null;
|
||||
}
|
||||
String valuepatternWithoutDelimiter = (request().body().asMultipartFormData().asFormUrlEncoded().get("pattern_without_delimiter"))[0];
|
||||
String patternWithoutDelimiter;
|
||||
@ -261,14 +278,14 @@ public class FakeApiController extends Controller {
|
||||
if (valuepassword != null) {
|
||||
password = valuepassword;
|
||||
} else {
|
||||
password = "null";
|
||||
password = null;
|
||||
}
|
||||
String valueparamCallback = (request().body().asMultipartFormData().asFormUrlEncoded().get("callback"))[0];
|
||||
String paramCallback;
|
||||
if (valueparamCallback != null) {
|
||||
paramCallback = valueparamCallback;
|
||||
} else {
|
||||
paramCallback = "null";
|
||||
paramCallback = null;
|
||||
}
|
||||
imp.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
|
||||
return ok();
|
||||
@ -342,21 +359,69 @@ public class FakeApiController extends Controller {
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result testGroupParameters() throws Exception {
|
||||
String valuerequiredStringGroup = request().getQueryString("required_string_group");
|
||||
Integer requiredStringGroup;
|
||||
if (valuerequiredStringGroup != null) {
|
||||
requiredStringGroup = Integer.parseInt(valuerequiredStringGroup);
|
||||
} else {
|
||||
throw new IllegalArgumentException("'required_string_group' parameter is required");
|
||||
}
|
||||
String valuerequiredInt64Group = request().getQueryString("required_int64_group");
|
||||
Long requiredInt64Group;
|
||||
if (valuerequiredInt64Group != null) {
|
||||
requiredInt64Group = Long.parseLong(valuerequiredInt64Group);
|
||||
} else {
|
||||
throw new IllegalArgumentException("'required_int64_group' parameter is required");
|
||||
}
|
||||
String valuestringGroup = request().getQueryString("string_group");
|
||||
Integer stringGroup;
|
||||
if (valuestringGroup != null) {
|
||||
stringGroup = Integer.parseInt(valuestringGroup);
|
||||
} else {
|
||||
stringGroup = null;
|
||||
}
|
||||
String valueint64Group = request().getQueryString("int64_group");
|
||||
Long int64Group;
|
||||
if (valueint64Group != null) {
|
||||
int64Group = Long.parseLong(valueint64Group);
|
||||
} else {
|
||||
int64Group = null;
|
||||
}
|
||||
String valuerequiredBooleanGroup = request().getHeader("required_boolean_group");
|
||||
Boolean requiredBooleanGroup;
|
||||
if (valuerequiredBooleanGroup != null) {
|
||||
requiredBooleanGroup = Boolean.valueOf(valuerequiredBooleanGroup);
|
||||
} else {
|
||||
throw new IllegalArgumentException("'required_boolean_group' parameter is required");
|
||||
}
|
||||
String valuebooleanGroup = request().getHeader("boolean_group");
|
||||
Boolean booleanGroup;
|
||||
if (valuebooleanGroup != null) {
|
||||
booleanGroup = Boolean.valueOf(valuebooleanGroup);
|
||||
} else {
|
||||
booleanGroup = null;
|
||||
}
|
||||
imp.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result testInlineAdditionalProperties() throws Exception {
|
||||
JsonNode noderequestBody = request().body().asJson();
|
||||
Map<String, String> requestBody;
|
||||
if (noderequestBody != null) {
|
||||
requestBody = mapper.readValue(noderequestBody.toString(), new TypeReference<Map<String, String>>(){});
|
||||
JsonNode nodeparam = request().body().asJson();
|
||||
Map<String, String> param;
|
||||
if (nodeparam != null) {
|
||||
param = mapper.readValue(nodeparam.toString(), new TypeReference<Map<String, String>>(){});
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
for (Map.Entry<String, String> entry : requestBody.entrySet()) {
|
||||
for (Map.Entry<String, String> entry : param.entrySet()) {
|
||||
OpenAPIUtils.validate(entry.getValue());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'request_body' parameter is required");
|
||||
throw new IllegalArgumentException("'param' parameter is required");
|
||||
}
|
||||
imp.testInlineAdditionalProperties(requestBody);
|
||||
imp.testInlineAdditionalProperties(param);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ -379,4 +444,70 @@ public class FakeApiController extends Controller {
|
||||
imp.testJsonFormData(param, param2);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result testQueryParameterCollectionFormat() throws Exception {
|
||||
String[] pipeArray = request().queryString().get("pipe");
|
||||
if (pipeArray == null) {
|
||||
throw new IllegalArgumentException("'pipe' parameter is required");
|
||||
}
|
||||
List<String> pipeList = OpenAPIUtils.parametersToList("csv", pipeArray);
|
||||
List<String> pipe = new ArrayList<String>();
|
||||
for (String curParam : pipeList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
pipe.add(curParam);
|
||||
}
|
||||
}
|
||||
String[] ioutilArray = request().queryString().get("ioutil");
|
||||
if (ioutilArray == null) {
|
||||
throw new IllegalArgumentException("'ioutil' parameter is required");
|
||||
}
|
||||
List<String> ioutilList = OpenAPIUtils.parametersToList("csv", ioutilArray);
|
||||
List<String> ioutil = new ArrayList<String>();
|
||||
for (String curParam : ioutilList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
ioutil.add(curParam);
|
||||
}
|
||||
}
|
||||
String[] httpArray = request().queryString().get("http");
|
||||
if (httpArray == null) {
|
||||
throw new IllegalArgumentException("'http' parameter is required");
|
||||
}
|
||||
List<String> httpList = OpenAPIUtils.parametersToList("space", httpArray);
|
||||
List<String> http = new ArrayList<String>();
|
||||
for (String curParam : httpList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
http.add(curParam);
|
||||
}
|
||||
}
|
||||
String[] urlArray = request().queryString().get("url");
|
||||
if (urlArray == null) {
|
||||
throw new IllegalArgumentException("'url' parameter is required");
|
||||
}
|
||||
List<String> urlList = OpenAPIUtils.parametersToList("csv", urlArray);
|
||||
List<String> url = new ArrayList<String>();
|
||||
for (String curParam : urlList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
url.add(curParam);
|
||||
}
|
||||
}
|
||||
String[] contextArray = request().queryString().get("context");
|
||||
if (contextArray == null) {
|
||||
throw new IllegalArgumentException("'context' parameter is required");
|
||||
}
|
||||
List<String> contextList = OpenAPIUtils.parametersToList("multi", contextArray);
|
||||
List<String> context = new ArrayList<String>();
|
||||
for (String curParam : contextList) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
context.add(curParam);
|
||||
}
|
||||
}
|
||||
imp.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
|
||||
return ok();
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import java.util.Map;
|
||||
import java.time.OffsetDateTime;
|
||||
import apimodels.OuterComposite;
|
||||
import apimodels.User;
|
||||
import apimodels.XmlItem;
|
||||
|
||||
import play.mvc.Http;
|
||||
import java.util.List;
|
||||
@ -18,6 +19,11 @@ import java.io.FileInputStream;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
public class FakeApiControllerImp implements FakeApiControllerImpInterface {
|
||||
@Override
|
||||
public void createXmlItem(XmlItem xmlItem) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean fakeOuterBooleanSerialize(Boolean body) throws Exception {
|
||||
//Do your magic!!!
|
||||
@ -25,7 +31,7 @@ public class FakeApiControllerImp implements FakeApiControllerImpInterface {
|
||||
}
|
||||
|
||||
@Override
|
||||
public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws Exception {
|
||||
public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws Exception {
|
||||
//Do your magic!!!
|
||||
return new OuterComposite();
|
||||
}
|
||||
@ -43,17 +49,17 @@ public class FakeApiControllerImp implements FakeApiControllerImpInterface {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws Exception {
|
||||
public void testBodyWithFileSchema(FileSchemaTestClass body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
public void testBodyWithQueryParams( @NotNull String query, User user) throws Exception {
|
||||
public void testBodyWithQueryParams( @NotNull String query, User body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
public Client testClientModel(Client client) throws Exception {
|
||||
public Client testClientModel(Client body) throws Exception {
|
||||
//Do your magic!!!
|
||||
return new Client();
|
||||
}
|
||||
@ -69,7 +75,12 @@ public class FakeApiControllerImp implements FakeApiControllerImpInterface {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void testInlineAdditionalProperties(Map<String, String> requestBody) throws Exception {
|
||||
public void testGroupParameters( @NotNull Integer requiredStringGroup, Boolean requiredBooleanGroup, @NotNull Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
public void testInlineAdditionalProperties(Map<String, String> param) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@ -78,4 +89,9 @@ public class FakeApiControllerImp implements FakeApiControllerImpInterface {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
public void testQueryParameterCollectionFormat( @NotNull List<String> pipe, @NotNull List<String> ioutil, @NotNull List<String> http, @NotNull List<String> url, @NotNull List<String> context) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import java.util.Map;
|
||||
import java.time.OffsetDateTime;
|
||||
import apimodels.OuterComposite;
|
||||
import apimodels.User;
|
||||
import apimodels.XmlItem;
|
||||
|
||||
import play.mvc.Http;
|
||||
import java.util.List;
|
||||
@ -19,26 +20,32 @@ import javax.validation.constraints.*;
|
||||
|
||||
@SuppressWarnings("RedundantThrows")
|
||||
public interface FakeApiControllerImpInterface {
|
||||
void createXmlItem(XmlItem xmlItem) throws Exception;
|
||||
|
||||
Boolean fakeOuterBooleanSerialize(Boolean body) throws Exception;
|
||||
|
||||
OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws Exception;
|
||||
OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws Exception;
|
||||
|
||||
BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws Exception;
|
||||
|
||||
String fakeOuterStringSerialize(String body) throws Exception;
|
||||
|
||||
void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws Exception;
|
||||
void testBodyWithFileSchema(FileSchemaTestClass body) throws Exception;
|
||||
|
||||
void testBodyWithQueryParams( @NotNull String query, User user) throws Exception;
|
||||
void testBodyWithQueryParams( @NotNull String query, User body) throws Exception;
|
||||
|
||||
Client testClientModel(Client client) throws Exception;
|
||||
Client testClientModel(Client body) throws Exception;
|
||||
|
||||
void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, Http.MultipartFormData.FilePart binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws Exception;
|
||||
|
||||
void testEnumParameters(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString) throws Exception;
|
||||
|
||||
void testInlineAdditionalProperties(Map<String, String> requestBody) throws Exception;
|
||||
void testGroupParameters( @NotNull Integer requiredStringGroup, Boolean requiredBooleanGroup, @NotNull Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws Exception;
|
||||
|
||||
void testInlineAdditionalProperties(Map<String, String> param) throws Exception;
|
||||
|
||||
void testJsonFormData(String param, String param2) throws Exception;
|
||||
|
||||
void testQueryParameterCollectionFormat( @NotNull List<String> pipe, @NotNull List<String> ioutil, @NotNull List<String> http, @NotNull List<String> url, @NotNull List<String> context) throws Exception;
|
||||
|
||||
}
|
||||
|
@ -37,17 +37,17 @@ public class FakeClassnameTags123ApiController extends Controller {
|
||||
|
||||
@ApiAction
|
||||
public Result testClassname() throws Exception {
|
||||
JsonNode nodeclient = request().body().asJson();
|
||||
Client client;
|
||||
if (nodeclient != null) {
|
||||
client = mapper.readValue(nodeclient.toString(), Client.class);
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
Client body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), Client.class);
|
||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||
OpenAPIUtils.validate(client);
|
||||
OpenAPIUtils.validate(body);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("'Client' parameter is required");
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
Client obj = imp.testClassname(client);
|
||||
Client obj = imp.testClassname(body);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import javax.validation.constraints.*;
|
||||
|
||||
public class FakeClassnameTags123ApiControllerImp implements FakeClassnameTags123ApiControllerImpInterface {
|
||||
@Override
|
||||
public Client testClassname(Client client) throws Exception {
|
||||
public Client testClassname(Client body) throws Exception {
|
||||
//Do your magic!!!
|
||||
return new Client();
|
||||
}
|
||||
|
@ -11,6 +11,6 @@ import javax.validation.constraints.*;
|
||||
|
||||
@SuppressWarnings("RedundantThrows")
|
||||
public interface FakeClassnameTags123ApiControllerImpInterface {
|
||||
Client testClassname(Client client) throws Exception;
|
||||
Client testClassname(Client body) throws Exception;
|
||||
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user