forked from loafle/openapi-generator-original
[Play Framework] Update minor version + scala version + swagger-ui version (#7200)
* Update play framework minor version + scala + swagger-ui + Remove bugs in the url of swagger-ui. * update samples Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
committed by
GitHub
parent
554747d59c
commit
14c14bf9a2
@@ -10,6 +10,6 @@ public class ApiDocController extends Controller {
|
||||
}
|
||||
|
||||
public Result api() {
|
||||
return redirect("/assets/lib/swagger-ui/index.html?/url=/assets/openapi.json");
|
||||
return redirect("/assets/lib/swagger-ui/index.html?url=/assets/openapi.json");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.io.InputStream;
|
||||
import apimodels.ModelApiResponse;
|
||||
import apimodels.Pet;
|
||||
|
||||
import com.typesafe.config.Config;
|
||||
import play.mvc.Controller;
|
||||
import play.mvc.Result;
|
||||
import play.mvc.Http;
|
||||
@@ -28,10 +29,10 @@ public class PetApiController extends Controller {
|
||||
|
||||
private final PetApiControllerImp imp;
|
||||
private final ObjectMapper mapper;
|
||||
private final Configuration configuration;
|
||||
private final Config configuration;
|
||||
|
||||
@Inject
|
||||
private PetApiController(Configuration configuration, PetApiControllerImp imp) {
|
||||
private PetApiController(Config configuration, PetApiControllerImp imp) {
|
||||
this.imp = imp;
|
||||
mapper = new ObjectMapper();
|
||||
this.configuration = configuration;
|
||||
|
||||
@@ -3,6 +3,7 @@ package controllers;
|
||||
import java.util.Map;
|
||||
import apimodels.Order;
|
||||
|
||||
import com.typesafe.config.Config;
|
||||
import play.mvc.Controller;
|
||||
import play.mvc.Result;
|
||||
import play.mvc.Http;
|
||||
@@ -27,10 +28,10 @@ public class StoreApiController extends Controller {
|
||||
|
||||
private final StoreApiControllerImp imp;
|
||||
private final ObjectMapper mapper;
|
||||
private final Configuration configuration;
|
||||
private final Config configuration;
|
||||
|
||||
@Inject
|
||||
private StoreApiController(Configuration configuration, StoreApiControllerImp imp) {
|
||||
private StoreApiController(Config configuration, StoreApiControllerImp imp) {
|
||||
this.imp = imp;
|
||||
mapper = new ObjectMapper();
|
||||
this.configuration = configuration;
|
||||
|
||||
@@ -3,6 +3,7 @@ package controllers;
|
||||
import java.util.List;
|
||||
import apimodels.User;
|
||||
|
||||
import com.typesafe.config.Config;
|
||||
import play.mvc.Controller;
|
||||
import play.mvc.Result;
|
||||
import play.mvc.Http;
|
||||
@@ -27,10 +28,10 @@ public class UserApiController extends Controller {
|
||||
|
||||
private final UserApiControllerImp imp;
|
||||
private final ObjectMapper mapper;
|
||||
private final Configuration configuration;
|
||||
private final Config configuration;
|
||||
|
||||
@Inject
|
||||
private UserApiController(Configuration configuration, UserApiControllerImp imp) {
|
||||
private UserApiController(Config configuration, UserApiControllerImp imp) {
|
||||
this.imp = imp;
|
||||
mapper = new ObjectMapper();
|
||||
this.configuration = configuration;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package openapitools;
|
||||
|
||||
|
||||
import com.typesafe.config.Config;
|
||||
import play.*;
|
||||
import play.api.OptionalSourceMapper;
|
||||
import play.api.UsefulException;
|
||||
@@ -18,7 +19,7 @@ import static play.mvc.Results.*;
|
||||
public class ErrorHandler extends DefaultHttpErrorHandler {
|
||||
|
||||
@Inject
|
||||
public ErrorHandler(Configuration configuration, Environment environment, OptionalSourceMapper sourceMapper, Provider<Router> routes) {
|
||||
public ErrorHandler(Config configuration, Environment environment, OptionalSourceMapper sourceMapper, Provider<Router> routes) {
|
||||
super(configuration, environment, sourceMapper, routes);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ version := "1.0-SNAPSHOT"
|
||||
|
||||
lazy val root = (project in file(".")).enablePlugins(PlayJava)
|
||||
|
||||
scalaVersion := "2.12.2"
|
||||
scalaVersion := "2.12.6"
|
||||
|
||||
libraryDependencies += "org.webjars" % "swagger-ui" % "3.1.5"
|
||||
libraryDependencies += "org.webjars" % "swagger-ui" % "3.23.5"
|
||||
libraryDependencies += "javax.validation" % "validation-api" % "1.1.0.Final"
|
||||
libraryDependencies += guice
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
// The Play plugin
|
||||
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.3")
|
||||
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.25")
|
||||
|
||||
Reference in New Issue
Block a user