Documenting a Spring HATEOAS API [closed]
Asked Answered
T

2

11

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.

Thromboplastin answered 5/5, 2015 at 10:49 Comment(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.Thromboplastin
Well, I can live with that... And well this question is worth upvoting too ;-)Cohbath
T
2

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.

Thromboplastin answered 14/5, 2015 at 10:41 Comment(1)
The HAL Browser is now a module you can install with maven coordinates org.springframework.data:spring-data-rest-hal-browser.Outwork
F
3

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.

Flinders answered 23/5, 2015 at 9:55 Comment(0)
T
2

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.

Thromboplastin answered 14/5, 2015 at 10:41 Comment(1)
The HAL Browser is now a module you can install with maven coordinates org.springframework.data:spring-data-rest-hal-browser.Outwork

© 2022 - 2024 — McMap. All rights reserved.