Sté*_*sin 6 markdown apiary.io apiblueprint dredd aglio
我创建了一个API,提供名为"Thumbnail"的资源(/缩略图)
{
"name": "toto",
"uri": "http://xxx"
}
Run Code Online (Sandbox Code Playgroud)
另一方面,我有多个资源,其中包含缩略图资源(如/ articles,/ videos ...):
{
"name": "playlist",
"thumbnail":
{
"name": "toto",
"uri": "http://xxx"
}
}
Run Code Online (Sandbox Code Playgroud)
当我在BluePrint markdown中编写这些web服务的模式时,我希望能够重用我为Thumbnail模式创建的模式,以便不重复模式中的代码.我对Trait功能很感兴趣(https://github.com/apiaryio/api-blueprint/issues/47),但我不知道它是否符合我的需求,是否适用于aglio和dredd.
你知道在我的情况下做的最好的事情吗?