我正在为API编写一个大头贴定义文件。该API适用于GET请求
/path/to/my/api:
get:
summary: My Custom API
description: |
Gets a List of FooBar IDs
produces:
- application/json
tags:
- FooBar
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/MyCustomType"
...
MyCustomType:
type: object
properties:
myCustomObject
type: ??? # list of string?
有关字符串列表,可以描述如下:
type: array
items:
type: string
参考:https : //github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#schemaObject
例子:
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句