Export documents generated swagger2

Baidu uses a lot of articles, can not use. Hereby record it

First, download the project

Download https://github.com/Swagger2Markup/spring-swagger2markup-demo projects under the Save, note the file path not to have Chinese.

Second, modify the configuration

Unzip the project, and opens with IDEA.

Start the project, browse  http: // localhost: 8080 / swagger -ui.html 

Input: HTTP: // localhost: 8080 / v2 / API-docs  json data saved pages, and this json file in the next path

Found pom.xml modifications: swagger.input> api-docs.json /swagger.input> value <is your json file path

Third, the compiler

Execute mvn test command, r \ target \ asciidoc find documentation generated

Guess you like

Origin www.cnblogs.com/zeussbook/p/11091520.html