I created an API that provides a resource called "Thumbnail" (/ thumbnails)
{ "name": "toto", "uri": "http://xxx" }
In the other hand, I have several resources that include this Thumbnail resource (e.g. / articles, / videos ...):
{ "name": "playlist", "thumbnail": { "name": "toto", "uri": "http://xxx" } }
When I write the diagrams of these web services in the BluePrint markdown, I would like to be able to reuse the diagram I created for the Thumbnail diagram so as not to repeat the code in the diagrams. I have the Trait function trait ( https://github.com/apiaryio/api-blueprint/issues/47 ), but I don’t know if it meets my needs and if it works with aglio and dredd.
Do you know what is best to do in my case?
source share