I want to implement Swagger-UI in Vert.X app. I have listed all routes and I want to see them in swagger-ui like in SpringBoot. I have also manually edited them in swagger-editor. So, how to open localhost:8080/swagger-ui.html from vert.x app and there to see all routers.
I read that i need to save the json from swagger-editor and to put it in src/resources. After that what?
Also i found a great stuff here: https://github.com/phiz71/vertx-swagger and http://vertx.io/blog/presentation-of-the-vert-x-swagger-project/
But how to implement it?
Go to http://localhost:8000/ in your address bar. This address lets you view the local web server. By default, web servers default to the index. html file in the directory, so it will show the Swagger UI file automatically.
Well, you started in the wrong direction a bit. Those examples demonstrate how to build VertX application out of Swagger files. What you want is to serve Swagger UI through VertX. I've put an example project for you: https://github.com/AlexeySoshin/VertxSwaggerUI
When you open http://localhost:8080/swagger/ you'll see all Swagger documentation, as usual.
If you want to do that by yourself:
router.route("/*").handler(StaticHandler.create());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With