Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Documenting a Spring HATEOAS API [closed]

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.

like image 908
wild_nothing Avatar asked May 05 '15 10:05

wild_nothing


2 Answers

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.

like image 91
Andreas Evers Avatar answered Nov 06 '22 15:11

Andreas Evers


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.

like image 20
wild_nothing Avatar answered Nov 06 '22 13:11

wild_nothing