forked from loafle/openapi-generator-original
Update the for play 2.7 (#7398)
* Fix the new package that deal with Configuration (the old one is depecrated) * First version to support Play Framework 2.7 * Fix small problems that prevent compilation of each samples. Now everything is compiling perfectly
This commit is contained in:
committed by
GitHub
parent
684b77166b
commit
09200eb04e
@@ -40,8 +40,8 @@ public class PetApiController extends Controller {
|
||||
|
||||
|
||||
@ApiAction
|
||||
public Result addPet() throws Exception {
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
public Result addPet(Http.Request request) throws Exception {
|
||||
JsonNode nodebody = request.body().asJson();
|
||||
Pet body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
||||
@@ -51,26 +51,26 @@ public class PetApiController extends Controller {
|
||||
} else {
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
imp.addPet(body);
|
||||
imp.addPet(request, body);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result deletePet(Long petId) throws Exception {
|
||||
String valueapiKey = request().getHeader("api_key");
|
||||
public Result deletePet(Http.Request request, Long petId) throws Exception {
|
||||
String valueapiKey = request.header("api_key").get();
|
||||
String apiKey;
|
||||
if (valueapiKey != null) {
|
||||
apiKey = valueapiKey;
|
||||
} else {
|
||||
apiKey = null;
|
||||
}
|
||||
imp.deletePet(petId, apiKey);
|
||||
imp.deletePet(request, petId, apiKey);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result findPetsByStatus() throws Exception {
|
||||
String[] statusArray = request().queryString().get("status");
|
||||
public Result findPetsByStatus(Http.Request request) throws Exception {
|
||||
String[] statusArray = request.queryString().get("status");
|
||||
if (statusArray == null) {
|
||||
throw new IllegalArgumentException("'status' parameter is required");
|
||||
}
|
||||
@@ -82,7 +82,7 @@ public class PetApiController extends Controller {
|
||||
status.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByStatus(status);
|
||||
List<Pet> obj = imp.findPetsByStatus(request, status);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
OpenAPIUtils.validate(curItem);
|
||||
@@ -93,8 +93,8 @@ public class PetApiController extends Controller {
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result findPetsByTags() throws Exception {
|
||||
String[] tagsArray = request().queryString().get("tags");
|
||||
public Result findPetsByTags(Http.Request request) throws Exception {
|
||||
String[] tagsArray = request.queryString().get("tags");
|
||||
if (tagsArray == null) {
|
||||
throw new IllegalArgumentException("'tags' parameter is required");
|
||||
}
|
||||
@@ -106,7 +106,7 @@ public class PetApiController extends Controller {
|
||||
tags.add(curParam);
|
||||
}
|
||||
}
|
||||
List<Pet> obj = imp.findPetsByTags(tags);
|
||||
List<Pet> obj = imp.findPetsByTags(request, tags);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
for (Pet curItem : obj) {
|
||||
OpenAPIUtils.validate(curItem);
|
||||
@@ -117,8 +117,8 @@ public class PetApiController extends Controller {
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result getPetById(Long petId) throws Exception {
|
||||
Pet obj = imp.getPetById(petId);
|
||||
public Result getPetById(Http.Request request, Long petId) throws Exception {
|
||||
Pet obj = imp.getPetById(request, petId);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
@@ -127,8 +127,8 @@ public class PetApiController extends Controller {
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result updatePet() throws Exception {
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
public Result updatePet(Http.Request request) throws Exception {
|
||||
JsonNode nodebody = request.body().asJson();
|
||||
Pet body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
||||
@@ -138,41 +138,41 @@ public class PetApiController extends Controller {
|
||||
} else {
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
imp.updatePet(body);
|
||||
imp.updatePet(request, body);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result updatePetWithForm(Long petId) throws Exception {
|
||||
String valuename = (request().body().asMultipartFormData().asFormUrlEncoded().get("name"))[0];
|
||||
public Result updatePetWithForm(Http.Request request, Long petId) throws Exception {
|
||||
String valuename = (request.body().asMultipartFormData().asFormUrlEncoded().get("name"))[0];
|
||||
String name;
|
||||
if (valuename != null) {
|
||||
name = valuename;
|
||||
} else {
|
||||
name = null;
|
||||
}
|
||||
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
||||
String valuestatus = (request.body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
||||
String status;
|
||||
if (valuestatus != null) {
|
||||
status = valuestatus;
|
||||
} else {
|
||||
status = null;
|
||||
}
|
||||
imp.updatePetWithForm(petId, name, status);
|
||||
imp.updatePetWithForm(request, petId, name, status);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result uploadFile(Long petId) throws Exception {
|
||||
String valueadditionalMetadata = (request().body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0];
|
||||
public Result uploadFile(Http.Request request, Long petId) throws Exception {
|
||||
String valueadditionalMetadata = (request.body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0];
|
||||
String additionalMetadata;
|
||||
if (valueadditionalMetadata != null) {
|
||||
additionalMetadata = valueadditionalMetadata;
|
||||
} else {
|
||||
additionalMetadata = null;
|
||||
}
|
||||
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
||||
ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file);
|
||||
Http.MultipartFormData.FilePart file = request.body().asMultipartFormData().getFile("file");
|
||||
ModelApiResponse obj = imp.uploadFile(request, petId, additionalMetadata, file);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
|
||||
@@ -14,45 +14,45 @@ import javax.validation.constraints.*;
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen")
|
||||
public class PetApiControllerImp implements PetApiControllerImpInterface {
|
||||
@Override
|
||||
public void addPet(Pet body) throws Exception {
|
||||
public void addPet(Http.Request request, Pet body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletePet(Long petId, String apiKey) throws Exception {
|
||||
public void deletePet(Http.Request request, Long petId, String apiKey) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Pet> findPetsByStatus( @NotNull List<String> status) throws Exception {
|
||||
public List<Pet> findPetsByStatus(Http.Request request, @NotNull List<String> status) throws Exception {
|
||||
//Do your magic!!!
|
||||
return new ArrayList<Pet>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Pet> findPetsByTags( @NotNull List<String> tags) throws Exception {
|
||||
public List<Pet> findPetsByTags(Http.Request request, @NotNull List<String> tags) throws Exception {
|
||||
//Do your magic!!!
|
||||
return new ArrayList<Pet>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pet getPetById(Long petId) throws Exception {
|
||||
public Pet getPetById(Http.Request request, Long petId) throws Exception {
|
||||
//Do your magic!!!
|
||||
return new Pet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePet(Pet body) throws Exception {
|
||||
public void updatePet(Http.Request request, Pet body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePetWithForm(Long petId, String name, String status) throws Exception {
|
||||
public void updatePetWithForm(Http.Request request, Long petId, String name, String status) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelApiResponse uploadFile(Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception {
|
||||
public ModelApiResponse uploadFile(Http.Request request, Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception {
|
||||
//Do your magic!!!
|
||||
return new ModelApiResponse();
|
||||
}
|
||||
|
||||
@@ -13,20 +13,20 @@ import javax.validation.constraints.*;
|
||||
|
||||
@SuppressWarnings("RedundantThrows")
|
||||
public interface PetApiControllerImpInterface {
|
||||
void addPet(Pet body) throws Exception;
|
||||
void addPet(Http.Request request, Pet body) throws Exception;
|
||||
|
||||
void deletePet(Long petId, String apiKey) throws Exception;
|
||||
void deletePet(Http.Request request, Long petId, String apiKey) throws Exception;
|
||||
|
||||
List<Pet> findPetsByStatus( @NotNull List<String> status) throws Exception;
|
||||
List<Pet> findPetsByStatus(Http.Request request, @NotNull List<String> status) throws Exception;
|
||||
|
||||
List<Pet> findPetsByTags( @NotNull List<String> tags) throws Exception;
|
||||
List<Pet> findPetsByTags(Http.Request request, @NotNull List<String> tags) throws Exception;
|
||||
|
||||
Pet getPetById(Long petId) throws Exception;
|
||||
Pet getPetById(Http.Request request, Long petId) throws Exception;
|
||||
|
||||
void updatePet(Pet body) throws Exception;
|
||||
void updatePet(Http.Request request, Pet body) throws Exception;
|
||||
|
||||
void updatePetWithForm(Long petId, String name, String status) throws Exception;
|
||||
void updatePetWithForm(Http.Request request, Long petId, String name, String status) throws Exception;
|
||||
|
||||
ModelApiResponse uploadFile(Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception;
|
||||
ModelApiResponse uploadFile(Http.Request request, Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception;
|
||||
|
||||
}
|
||||
|
||||
@@ -39,21 +39,21 @@ public class StoreApiController extends Controller {
|
||||
|
||||
|
||||
@ApiAction
|
||||
public Result deleteOrder(String orderId) throws Exception {
|
||||
imp.deleteOrder(orderId);
|
||||
public Result deleteOrder(Http.Request request, String orderId) throws Exception {
|
||||
imp.deleteOrder(request, orderId);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result getInventory() throws Exception {
|
||||
Map<String, Integer> obj = imp.getInventory();
|
||||
public Result getInventory(Http.Request request) throws Exception {
|
||||
Map<String, Integer> obj = imp.getInventory(request);
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result getOrderById( @Min(1) @Max(5)Long orderId) throws Exception {
|
||||
Order obj = imp.getOrderById(orderId);
|
||||
public Result getOrderById(Http.Request request, @Min(1) @Max(5)Long orderId) throws Exception {
|
||||
Order obj = imp.getOrderById(request, orderId);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
@@ -62,8 +62,8 @@ public class StoreApiController extends Controller {
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result placeOrder() throws Exception {
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
public Result placeOrder(Http.Request request) throws Exception {
|
||||
JsonNode nodebody = request.body().asJson();
|
||||
Order body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), Order.class);
|
||||
@@ -73,7 +73,7 @@ public class StoreApiController extends Controller {
|
||||
} else {
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
Order obj = imp.placeOrder(body);
|
||||
Order obj = imp.placeOrder(request, body);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
|
||||
@@ -13,24 +13,24 @@ import javax.validation.constraints.*;
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen")
|
||||
public class StoreApiControllerImp implements StoreApiControllerImpInterface {
|
||||
@Override
|
||||
public void deleteOrder(String orderId) throws Exception {
|
||||
public void deleteOrder(Http.Request request, String orderId) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Integer> getInventory() throws Exception {
|
||||
public Map<String, Integer> getInventory(Http.Request request) throws Exception {
|
||||
//Do your magic!!!
|
||||
return new HashMap<String, Integer>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Order getOrderById( @Min(1) @Max(5)Long orderId) throws Exception {
|
||||
public Order getOrderById(Http.Request request, @Min(1) @Max(5)Long orderId) throws Exception {
|
||||
//Do your magic!!!
|
||||
return new Order();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Order placeOrder(Order body) throws Exception {
|
||||
public Order placeOrder(Http.Request request, Order body) throws Exception {
|
||||
//Do your magic!!!
|
||||
return new Order();
|
||||
}
|
||||
|
||||
@@ -12,12 +12,12 @@ import javax.validation.constraints.*;
|
||||
|
||||
@SuppressWarnings("RedundantThrows")
|
||||
public interface StoreApiControllerImpInterface {
|
||||
void deleteOrder(String orderId) throws Exception;
|
||||
void deleteOrder(Http.Request request, String orderId) throws Exception;
|
||||
|
||||
Map<String, Integer> getInventory() throws Exception;
|
||||
Map<String, Integer> getInventory(Http.Request request) throws Exception;
|
||||
|
||||
Order getOrderById( @Min(1) @Max(5)Long orderId) throws Exception;
|
||||
Order getOrderById(Http.Request request, @Min(1) @Max(5)Long orderId) throws Exception;
|
||||
|
||||
Order placeOrder(Order body) throws Exception;
|
||||
Order placeOrder(Http.Request request, Order body) throws Exception;
|
||||
|
||||
}
|
||||
|
||||
@@ -39,8 +39,8 @@ public class UserApiController extends Controller {
|
||||
|
||||
|
||||
@ApiAction
|
||||
public Result createUser() throws Exception {
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
public Result createUser(Http.Request request) throws Exception {
|
||||
JsonNode nodebody = request.body().asJson();
|
||||
User body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), User.class);
|
||||
@@ -50,13 +50,13 @@ public class UserApiController extends Controller {
|
||||
} else {
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
imp.createUser(body);
|
||||
imp.createUser(request, body);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result createUsersWithArrayInput() throws Exception {
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
public Result createUsersWithArrayInput(Http.Request request) throws Exception {
|
||||
JsonNode nodebody = request.body().asJson();
|
||||
List<User> body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
||||
@@ -68,13 +68,13 @@ public class UserApiController extends Controller {
|
||||
} else {
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
imp.createUsersWithArrayInput(body);
|
||||
imp.createUsersWithArrayInput(request, body);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result createUsersWithListInput() throws Exception {
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
public Result createUsersWithListInput(Http.Request request) throws Exception {
|
||||
JsonNode nodebody = request.body().asJson();
|
||||
List<User> body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
||||
@@ -86,19 +86,19 @@ public class UserApiController extends Controller {
|
||||
} else {
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
imp.createUsersWithListInput(body);
|
||||
imp.createUsersWithListInput(request, body);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result deleteUser(String username) throws Exception {
|
||||
imp.deleteUser(username);
|
||||
public Result deleteUser(Http.Request request, String username) throws Exception {
|
||||
imp.deleteUser(request, username);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result getUserByName(String username) throws Exception {
|
||||
User obj = imp.getUserByName(username);
|
||||
public Result getUserByName(Http.Request request, String username) throws Exception {
|
||||
User obj = imp.getUserByName(request, username);
|
||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||
OpenAPIUtils.validate(obj);
|
||||
}
|
||||
@@ -107,35 +107,35 @@ public class UserApiController extends Controller {
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result loginUser() throws Exception {
|
||||
String valueusername = request().getQueryString("username");
|
||||
public Result loginUser(Http.Request request) throws Exception {
|
||||
String valueusername = request.getQueryString("username");
|
||||
String username;
|
||||
if (valueusername != null) {
|
||||
username = valueusername;
|
||||
} else {
|
||||
throw new IllegalArgumentException("'username' parameter is required");
|
||||
}
|
||||
String valuepassword = request().getQueryString("password");
|
||||
String valuepassword = request.getQueryString("password");
|
||||
String password;
|
||||
if (valuepassword != null) {
|
||||
password = valuepassword;
|
||||
} else {
|
||||
throw new IllegalArgumentException("'password' parameter is required");
|
||||
}
|
||||
String obj = imp.loginUser(username, password);
|
||||
String obj = imp.loginUser(request, username, password);
|
||||
JsonNode result = mapper.valueToTree(obj);
|
||||
return ok(result);
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result logoutUser() throws Exception {
|
||||
imp.logoutUser();
|
||||
public Result logoutUser(Http.Request request) throws Exception {
|
||||
imp.logoutUser(request);
|
||||
return ok();
|
||||
}
|
||||
|
||||
@ApiAction
|
||||
public Result updateUser(String username) throws Exception {
|
||||
JsonNode nodebody = request().body().asJson();
|
||||
public Result updateUser(Http.Request request, String username) throws Exception {
|
||||
JsonNode nodebody = request.body().asJson();
|
||||
User body;
|
||||
if (nodebody != null) {
|
||||
body = mapper.readValue(nodebody.toString(), User.class);
|
||||
@@ -145,7 +145,7 @@ public class UserApiController extends Controller {
|
||||
} else {
|
||||
throw new IllegalArgumentException("'body' parameter is required");
|
||||
}
|
||||
imp.updateUser(username, body);
|
||||
imp.updateUser(request, username, body);
|
||||
return ok();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,44 +13,44 @@ import javax.validation.constraints.*;
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen")
|
||||
public class UserApiControllerImp implements UserApiControllerImpInterface {
|
||||
@Override
|
||||
public void createUser(User body) throws Exception {
|
||||
public void createUser(Http.Request request, User body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createUsersWithArrayInput(List<User> body) throws Exception {
|
||||
public void createUsersWithArrayInput(Http.Request request, List<User> body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createUsersWithListInput(List<User> body) throws Exception {
|
||||
public void createUsersWithListInput(Http.Request request, List<User> body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteUser(String username) throws Exception {
|
||||
public void deleteUser(Http.Request request, String username) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
public User getUserByName(String username) throws Exception {
|
||||
public User getUserByName(Http.Request request, String username) throws Exception {
|
||||
//Do your magic!!!
|
||||
return new User();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String loginUser( @NotNull String username, @NotNull String password) throws Exception {
|
||||
public String loginUser(Http.Request request, @NotNull String username, @NotNull String password) throws Exception {
|
||||
//Do your magic!!!
|
||||
return new String();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logoutUser() throws Exception {
|
||||
public void logoutUser(Http.Request request) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateUser(String username, User body) throws Exception {
|
||||
public void updateUser(Http.Request request, String username, User body) throws Exception {
|
||||
//Do your magic!!!
|
||||
}
|
||||
|
||||
|
||||
@@ -12,20 +12,20 @@ import javax.validation.constraints.*;
|
||||
|
||||
@SuppressWarnings("RedundantThrows")
|
||||
public interface UserApiControllerImpInterface {
|
||||
void createUser(User body) throws Exception;
|
||||
void createUser(Http.Request request, User body) throws Exception;
|
||||
|
||||
void createUsersWithArrayInput(List<User> body) throws Exception;
|
||||
void createUsersWithArrayInput(Http.Request request, List<User> body) throws Exception;
|
||||
|
||||
void createUsersWithListInput(List<User> body) throws Exception;
|
||||
void createUsersWithListInput(Http.Request request, List<User> body) throws Exception;
|
||||
|
||||
void deleteUser(String username) throws Exception;
|
||||
void deleteUser(Http.Request request, String username) throws Exception;
|
||||
|
||||
User getUserByName(String username) throws Exception;
|
||||
User getUserByName(Http.Request request, String username) throws Exception;
|
||||
|
||||
String loginUser( @NotNull String username, @NotNull String password) throws Exception;
|
||||
String loginUser(Http.Request request, @NotNull String username, @NotNull String password) throws Exception;
|
||||
|
||||
void logoutUser() throws Exception;
|
||||
void logoutUser(Http.Request request) throws Exception;
|
||||
|
||||
void updateUser(String username, User body) throws Exception;
|
||||
void updateUser(Http.Request request, String username, User body) throws Exception;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ lazy val root = (project in file(".")).enablePlugins(PlayJava)
|
||||
|
||||
scalaVersion := "2.12.6"
|
||||
|
||||
libraryDependencies += "org.webjars" % "swagger-ui" % "3.23.5"
|
||||
libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5"
|
||||
libraryDependencies += "javax.validation" % "validation-api" % "1.1.0.Final"
|
||||
libraryDependencies += guice
|
||||
|
||||
@@ -6,30 +6,30 @@ GET /api controllers.ApiDocController.api
|
||||
|
||||
|
||||
#Functions for Pet API
|
||||
POST /v2/pet controllers.PetApiController.addPet()
|
||||
DELETE /v2/pet/:petId controllers.PetApiController.deletePet(petId: Long)
|
||||
GET /v2/pet/findByStatus controllers.PetApiController.findPetsByStatus()
|
||||
GET /v2/pet/findByTags controllers.PetApiController.findPetsByTags()
|
||||
GET /v2/pet/:petId controllers.PetApiController.getPetById(petId: Long)
|
||||
PUT /v2/pet controllers.PetApiController.updatePet()
|
||||
POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long)
|
||||
POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long)
|
||||
POST /v2/pet controllers.PetApiController.addPet(request: Request)
|
||||
DELETE /v2/pet/:petId controllers.PetApiController.deletePet(request: Request, petId: Long)
|
||||
GET /v2/pet/findByStatus controllers.PetApiController.findPetsByStatus(request: Request)
|
||||
GET /v2/pet/findByTags controllers.PetApiController.findPetsByTags(request: Request)
|
||||
GET /v2/pet/:petId controllers.PetApiController.getPetById(request: Request, petId: Long)
|
||||
PUT /v2/pet controllers.PetApiController.updatePet(request: Request)
|
||||
POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(request: Request, petId: Long)
|
||||
POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(request: Request, petId: Long)
|
||||
|
||||
#Functions for Store API
|
||||
DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String)
|
||||
GET /v2/store/inventory controllers.StoreApiController.getInventory()
|
||||
GET /v2/store/order/:orderId controllers.StoreApiController.getOrderById(orderId: Long)
|
||||
POST /v2/store/order controllers.StoreApiController.placeOrder()
|
||||
DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(request: Request, orderId: String)
|
||||
GET /v2/store/inventory controllers.StoreApiController.getInventory(request: Request)
|
||||
GET /v2/store/order/:orderId controllers.StoreApiController.getOrderById(request: Request, orderId: Long)
|
||||
POST /v2/store/order controllers.StoreApiController.placeOrder(request: Request)
|
||||
|
||||
#Functions for User API
|
||||
POST /v2/user controllers.UserApiController.createUser()
|
||||
POST /v2/user/createWithArray controllers.UserApiController.createUsersWithArrayInput()
|
||||
POST /v2/user/createWithList controllers.UserApiController.createUsersWithListInput()
|
||||
DELETE /v2/user/:username controllers.UserApiController.deleteUser(username: String)
|
||||
GET /v2/user/:username controllers.UserApiController.getUserByName(username: String)
|
||||
GET /v2/user/login controllers.UserApiController.loginUser()
|
||||
GET /v2/user/logout controllers.UserApiController.logoutUser()
|
||||
PUT /v2/user/:username controllers.UserApiController.updateUser(username: String)
|
||||
POST /v2/user controllers.UserApiController.createUser(request: Request)
|
||||
POST /v2/user/createWithArray controllers.UserApiController.createUsersWithArrayInput(request: Request)
|
||||
POST /v2/user/createWithList controllers.UserApiController.createUsersWithListInput(request: Request)
|
||||
DELETE /v2/user/:username controllers.UserApiController.deleteUser(request: Request, username: String)
|
||||
GET /v2/user/:username controllers.UserApiController.getUserByName(request: Request, username: String)
|
||||
GET /v2/user/login controllers.UserApiController.loginUser(request: Request)
|
||||
GET /v2/user/logout controllers.UserApiController.logoutUser(request: Request)
|
||||
PUT /v2/user/:username controllers.UserApiController.updateUser(request: Request, username: String)
|
||||
|
||||
# Map static resources from the /public folder to the /assets URL path
|
||||
GET /assets/*file controllers.Assets.at(file)
|
||||
|
||||
@@ -1 +1 @@
|
||||
sbt.version=0.13.15
|
||||
sbt.version=1.3.13
|
||||
@@ -1,2 +1,2 @@
|
||||
// The Play plugin
|
||||
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.25")
|
||||
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.5")
|
||||
Reference in New Issue
Block a user