简体   繁体   中英

Offline swagger documentation using maven plugin

I am trying to generate swagger documentation, for that I need to start the server. I Want to generate swagger documentation offline (with out starting the server), I just got this link swagger-codegen-maven-plugin

But when I added above plugin to POM.xml (Suppose to generate HTML doc during maven build i feel), it is not at all doing anything. Please help.

Take a look at this plugin: https://github.com/teamcarma/swagger-jaxrs-doclet

As the JSON resource listing is generated offline from source code it means that you do not need to add any runtime dependencies to your project and avoid potential headaches with different jar versions and jaxrs implementations. This also avoids increasing the size of your artifacts

To generate the HTML documentation, you need to set the value of the language tag in the configuration to HTML. In the example from your link, it is set to java . Change it to html . If you need both Java and HTML to be generated, have two execution blocks, one for Java, one for HTML.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM