I have a spring boot MVC java Web app. I've been able to integrate Springfox for API documentation. I can visually see all of the APIs when server is up and running.
How can I generate OFFLINE swagger API documentation? Note: I would not like to use asciidoc or markdown documentation, but I'd like the same swagger API user interface in html files. I'd like so that the links are relative to local directory instead of local host server links. Thanks
Springfox allows you to easily create a Swagger tester/API docs based on your Spring annotations.
Swagger itself has some tools to allow you to generate offline/static documentation:
Both of them require a Swagger YAML or JSON file. In case you don't have a Swagger definition in YAML/JSON because you're using Springfox, you can use the generated file used for Swagger UI (/v2/api-docs?group=<group name>
).
Swagger has tool for generating offline docs.
The tool is "Swagger2Markup" which is located @ Github.
The output of "Swagger2Markup" can be used as an alternative to swagger-ui and can be served as static content.
Here is an Example
Good luck! :)
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