如何在API蓝图定义中使用通用命名类型?
我试着这样做:
FORMAT: 1A HOST: http://test.com/
# API Blueprint testing.
## Resource [/resources]
### Action [GET]
+ Response 200 (application/json)
+ Attributes
+ decorated_person (Address Decorator(Person))
# Data Structures
## Person (object)
+ first_name
+ last_name
## Address Decorator (*T*)
+ address但是Apiary编辑器给我一个错误:
文档中没有定义基类型“Address Decorator(Person)”
发布于 2016-12-08 10:58:15
这里有两个问题。例如,Address Decorator不是基本类型,在属性中必须使用混合或嵌套。
FORMAT: 1A
HOST: http://test.com/
# API Blueprint testing.
## Resource [/resources]
### Action [GET]
+ Response 200 (application/json)
+ Attributes
+ Include AddressDecorator
# Data Structures
## Person (object)
+ first_name
+ last_name
## AddressDecorator (object)
+ addresshttps://stackoverflow.com/questions/41037483
复制相似问题