You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current template for MainApiVerticle incorrectly instantiates the protected main Router and does not re-use that router member with the instantiated SwaggerRouter. I propose that we modify the template as follows:
Initiantiate the router as part of the init flow to ensure that the vertx instance is not null:
Also, pass the router member as the first parameter of the SwaggerRouter creation:
Router swaggerRouter = SwaggerRouter.swaggerRouter(router, swagger, vertx.eventBus(), new OperationIdServiceIdResolver());
Swagger-codegen version
2.2.3 and above
Swagger declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
The text was updated successfully, but these errors were encountered:
ccozzolino
changed the title
[JAVA] [library: vertx] Improvement: Make MainApiVerticle template more flexible
[JAVA] [library: vertx] Fix improper initialization of main router in MainApiVerticle template
Dec 20, 2017
Description
The current template for MainApiVerticle incorrectly instantiates the protected main Router and does not re-use that router member with the instantiated SwaggerRouter. I propose that we modify the template as follows:
Initiantiate the router as part of the init flow to ensure that the
vertx
instance is not null:Also, pass the
router
member as the first parameter of the SwaggerRouter creation:Swagger-codegen version
2.2.3 and above
Swagger declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
The text was updated successfully, but these errors were encountered: