Maven project with an example how the OpenAPI spec can be generated based on implementation. It provides also the information on how static documentation can be generated based on the spec.
Example based on springdoc
- Run application using
mvn spring-boot:run -Pspringdoc - Open
http://localhost:8080/swagger-ui.htmlin browser
- Run application using
mvn install -Pspringdoc - Output file is in
target/openapi.json
Example made with help of ReDoc
HTML doc generated for this project redoc-example
- Install Node.js
- Install redoc-cli. Run
npm install -g redoc-cli
- Generate
openapi.jsonfor the project - Run
redoc-cli bundle target/openapi.json --options.hideHostname=true - Open
redoc-static.htmlin browser
Example made with help of widdershins
MD doc generated for this project widdershins-example
- Install Node.js
- Install widdershins. Run
npm install -g widdershins
- Generate
openapi.jsonfor the project - Run
node widdershins --search false --language_tabs 'java:Java' --summary target/openapi.json -o doc/widdershins-static.md - Open
doc/widdershins-static.mdin markdown viewer.
Example made with help of RapiPdf
Open doc/RapiPDF.html in browser and click GENERATE PDF.