简体   繁体   中英

Can spring restdocs generate live documentation like swagger?

As a developer, I prefer spring restdocs. But as a consumer of the documentation, I find the swagger live documentation to be very compelling. Here's the ubiquitous example: http://petstore.swagger.io/

Is there a way to document my rest apis with spring restdocs but generate live documentation like the swagger petstore with it? If so, how do you do this?

No, it's not possible out of the box. REST Docs is intended to be extensible so you could add the functionality yourself but it would be a significant undertaking.

I'm the lead of the REST Docs project and support for live documentation is of interest, but it's not a particularly high priority at the moment. In my experience, live documentation can be useful as a playground but does a poor job of actually documenting a service. My focus at the moment is on producing accurate and well-structured documentation. Using REST Docs with Slate can give you a big jumpstart on the latter if you're looking for something more guiding than Asciidoctor's blank canvas.

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