11
votes

Are there any plugins out there (similar to Swagger) which provide the ability to document HATEOAS APIs?

The Swagger interface is quite good but it doesn't have level 3 REST support.

2
@GhostCat I figured it was a pretty ridiculous question after my head re-emerged from the DI rabbit hole and I could see it for what it was. - wild_nothing
Well, I can live with that... And well this question is worth upvoting too ;-) - GhostCat

2 Answers

3
votes

I use spring-restdocs in combination with the HAL-browser.

You don't necessarily need HAL for restdocs though, although it is recommended.

Restdocs will generate code samples and link & field descriptors in the asciidoc format. You can then link to these asciidocs from inside the HAL-browser.

To see the result in action (although this is hardcoded), check this out: foxycart. Click on the little doc links next to the rels.

2
votes

After further investigation I discovered HAL-browser (https://github.com/mikekelly/hal-browser) which is quite good. Although, your API must return content-type of HAL for it.

You don't need to configure anything on the server for this tool. Just open it in a browser and point to your API.