mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-07 14:56:11 +00:00
[Java Play Framework] Warnings removal and default value fix (#5660)
* First commit of the Java Play Framework server generator. It is highly based on Spring so there might me a couple of things that don't make sense (like options or parameters) for the Play Framework. * Fix suggestions in the PR discussion + add .bat and .sh file as requested. * Updated Readme.md file * Remove unused mustache file + fix baseName vs paramName in all the mustache files. * Fix the compilation error when we have a body which is a list or map. Doesn't fix the problem with the annotation itself. * Fix the problem with the Http.MultipartFormData.FilePart * Removal of warning (final) and fix of a missing default value for boolean query parameters
This commit is contained in:
committed by
wing328
parent
ad0838f0a0
commit
ef2028e53f
@@ -23,8 +23,8 @@ import swagger.SwaggerUtils.ApiAction;
|
||||
|
||||
public class PetApiController extends Controller {
|
||||
|
||||
private PetApiControllerImp imp;
|
||||
private ObjectMapper mapper;
|
||||
private final PetApiControllerImp imp;
|
||||
private final ObjectMapper mapper;
|
||||
|
||||
@Inject
|
||||
private PetApiController(PetApiControllerImp imp) {
|
||||
@@ -62,9 +62,7 @@ public class PetApiController extends Controller {
|
||||
|
||||
@ApiAction
|
||||
public Result findPetsByStatus() throws Exception {
|
||||
//TODO: Maybe implement this in the future if we can support collection in the body params: see bug in swagger-play: https://github.com/swagger-api/swagger-play/issues/130
|
||||
//TODO: Tt seems it is not detected that it's a list based on the collectionFormat field?
|
||||
//WIP when both bugs will be fixed
|
||||
//TODO: Support this later
|
||||
//List<Pair> statusPair = SwaggerUtils.parameterToPairs("csv", "status", request().getQueryString("status"));
|
||||
List<String> status = new ArrayList<String>();
|
||||
//for (Pair pair : statusPair) {
|
||||
@@ -78,9 +76,7 @@ public class PetApiController extends Controller {
|
||||
|
||||
@ApiAction
|
||||
public Result findPetsByTags() throws Exception {
|
||||
//TODO: Maybe implement this in the future if we can support collection in the body params: see bug in swagger-play: https://github.com/swagger-api/swagger-play/issues/130
|
||||
//TODO: Tt seems it is not detected that it's a list based on the collectionFormat field?
|
||||
//WIP when both bugs will be fixed
|
||||
//TODO: Support this later
|
||||
//List<Pair> tagsPair = SwaggerUtils.parameterToPairs("csv", "tags", request().getQueryString("tags"));
|
||||
List<String> tags = new ArrayList<String>();
|
||||
//for (Pair pair : tagsPair) {
|
||||
|
||||
@@ -22,8 +22,8 @@ import swagger.SwaggerUtils.ApiAction;
|
||||
|
||||
public class StoreApiController extends Controller {
|
||||
|
||||
private StoreApiControllerImp imp;
|
||||
private ObjectMapper mapper;
|
||||
private final StoreApiControllerImp imp;
|
||||
private final ObjectMapper mapper;
|
||||
|
||||
@Inject
|
||||
private StoreApiController(StoreApiControllerImp imp) {
|
||||
|
||||
@@ -22,8 +22,8 @@ import swagger.SwaggerUtils.ApiAction;
|
||||
|
||||
public class UserApiController extends Controller {
|
||||
|
||||
private UserApiControllerImp imp;
|
||||
private ObjectMapper mapper;
|
||||
private final UserApiControllerImp imp;
|
||||
private final ObjectMapper mapper;
|
||||
|
||||
@Inject
|
||||
private UserApiController(UserApiControllerImp imp) {
|
||||
|
||||
Reference in New Issue
Block a user