spring-restdocs
spring-restdocs copied to clipboard
Make it easier to document a resource with fields and links that come and go as the resource's state changes
At the moment you can document a link or field that isn't there by marking it as optional. It works, but it can lead to inaccuracies in the documentation. An alternative would be to allow the links, fields etc that need to be documented to be accumulated over multiple calls to the service. Once all of the calls are complete, and the resource has transitioned through its various states, the snippet can be produced and it can verify that all of the documented links, fields, etc were actually present.