在API Blueprint中为数据结构添加注释

时间:2015-11-24 15:54:03

标签: data-structures markdown apiblueprint apiary.io

我有两个属性,其中一个必须提供。我试图在数据结构的底部添加注释,但它被忽略了。所以我尝试了多行描述,但也被忽略了:

# Data Structures

## Record (object)

+ ResponseId: `42f7b8b07da641bcb6d96422cb903c0e` (string, optional) - Identifier for the record being updated
+ UniqueReference: 1 (number, optional) - Reference for the record being updated.

    If both are supplied, response id will be used

1 个答案:

答案 0 :(得分:1)

将描述添加到顶部并使用member type separator将其与成员属性分开。

例如

# Data Structures

## Record (object)

If both are supplied, response id will be used

### Properties

- ResponseId: 42f7b8b07da641bcb6d96422cb903c0e (string, optional) - Identifier for the record being updated
- UniqueReference: 1 (number, optional) - Reference for the record being updated.