3
为休息服务编写API-Deocumentation时遇到了一个问题,我想列出所有可能作为响应返回的值。Blueprint API显示响应正文中Enum的所有可能值
在下面的情况下,它可能是“状态”字段,它可能包含任何可能的枚举值,我想总结哪些可能的状态。
我找不到一个简单而好的方法来用apiblueprint做到这一点。有没有办法显示默认情况下折叠的部分,并在需要其他信息时展开它们?
下面是示例代码,我有:
## Sample [/Sample?{id}]
Get all the information for the sample
+ Parameters
+ id = `0` (Integer, optional) ... The Id of the resource to get
+ Model (application/json)
+ Body
{
"name": "Name of the Resource",
"state": "deleted"
}
### Retrieve the sample data of the system [GET]
+ Response 200
[ProviderConfiguration][]
我需要的东西,如“值”参数部分但对身体部位来形容在主体部分国家如
<collapsible>
+ state (EnumType) ... current state of the sample object
+ Values
+ `active`
+ `inactive`
+ `deleted`
</collapsible>
请注意,您也可以直接在请求或响应负载上添加注释 - 有关详细信息,请参阅http://stackoverflow.com/a/23769985/634940 – Zdenek