I have created an API that delivers a resource named "Thumbnail" (/thumbnails)
{
"name": "toto",
"uri": "http://xxx"
}
In other hand I have multiple resources that includes that Thumbnail resource in them (like /articles, /videos ...):
{
"name": "playlist",
"thumbnail":
{
"name": "toto",
"uri": "http://xxx"
}
}
When I write the schemas of those webservices in the BluePrint markdown, I would like to be able to reuse the schema that I've created for the Thumbnail schema in order to not repeat the code in the schemas. I've heart of the Trait feature ( https://github.com/apiaryio/api-blueprint/issues/47 ) but I don't know if it will fit my needs and if it works with aglio and dredd.
Do you know the best thing to do in my case?
npm install -g aglio@beta
. Soon it will be released as version 2.0. – Roadability