phiz71 / vertx-swagger

Swagger integration in Eclipse Vert.X world. A dynamic Vert.X router, configured with a swagger file and a swagger-codegen plugin to generate a server stub.
Apache License 2.0
86 stars 35 forks source link

MainApiVerticle template change request #110

Closed cfinu closed 2 years ago

cfinu commented 5 years ago

The line private final Router router = Router.router(vertx); in the MainApiVerticle template is useless. The router is created in SwaggerRouter.swaggerRouter later. It would be helpful to support swagger-ui by adding one line into the template: swaggerRouter.route("/*").handler(StaticHandler.create()); directly behind the creation of the SwaggerRouter. Then one can put the swagger-ui files and the swagger.json into a webroot/something resource directory, accessing it via http:/server:port/something.