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

时间:2022-08-08 16:59:27

I have two properties, one of which must be supplied. I was trying to add a comment at the bottom of the data structure but it was ignored. So I tried a multi line description but that was also ignored:

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

# 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 个解决方案

#1


1  

Add the description to the top and use member type separator to separate it from the member properties.

将描述添加到顶部并使用成员类型分隔符将其与成员属性分开。

Eg.

例如。

# 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.

#1


1  

Add the description to the top and use member type separator to separate it from the member properties.

将描述添加到顶部并使用成员类型分隔符将其与成员属性分开。

Eg.

例如。

# 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.