如何在 api-blueprint 中为字符串数组参数提供示例值
How to supply example value for string array parameter in api-blueprint
我正在 api-blueprint 中使用这个 API。
## Variables [/Variables{?names}]
### Retrieve the variables [GET]
+ Parameter
+ names: `First` (array[string]) - The variables names.
我正在尝试将 names 的默认值设置为多个值
/Variables?names=first&names=second
但我不知道如何指定它。我在谷歌上搜索过,不知道是否支持。希望这里有人知道答案。
我发现的另一个极端情况是枚举值:
## Variables [/Variables{?names}]
### Retrieve the variables [GET]
+ Parameter
+ dataTypes: `Boolean,DateTime` (array[enum], required) - The variable data types. To request more than one data type, repeat the parameter
e.g. dataTypes=Boolean&dataTypes=DateTime
+ Members
+ `Boolean` - The variable contains a boolean response (true / false).
+ `DateTime` - The variable contains a date / time response.
+ `MultipleCode` - The variable contains multiple selections from a collection of defined coded values.
+ `Numeric` - The variable contains a numeric response.
+ `SingleCode` - The The variable contains a single selection from a collection of defined coded values.
+ `Text` - The variable contains a text response.
类型是 (array, required) 还是 (array[enum], required) 似乎无关紧要,我仍然遇到语义错误。
+ names: `first,second` (array) - The variables names.
这应该可以正常工作。
我正在 api-blueprint 中使用这个 API。
## Variables [/Variables{?names}]
### Retrieve the variables [GET]
+ Parameter
+ names: `First` (array[string]) - The variables names.
我正在尝试将 names 的默认值设置为多个值
/Variables?names=first&names=second
但我不知道如何指定它。我在谷歌上搜索过,不知道是否支持。希望这里有人知道答案。
我发现的另一个极端情况是枚举值:
## Variables [/Variables{?names}]
### Retrieve the variables [GET]
+ Parameter
+ dataTypes: `Boolean,DateTime` (array[enum], required) - The variable data types. To request more than one data type, repeat the parameter
e.g. dataTypes=Boolean&dataTypes=DateTime
+ Members
+ `Boolean` - The variable contains a boolean response (true / false).
+ `DateTime` - The variable contains a date / time response.
+ `MultipleCode` - The variable contains multiple selections from a collection of defined coded values.
+ `Numeric` - The variable contains a numeric response.
+ `SingleCode` - The The variable contains a single selection from a collection of defined coded values.
+ `Text` - The variable contains a text response.
类型是 (array, required) 还是 (array[enum], required) 似乎无关紧要,我仍然遇到语义错误。
+ names: `first,second` (array) - The variables names.
这应该可以正常工作。