我正在通过 Swagger 2.0 创建 API。在 Swagger 2.0 上一切都很好,但是,当它构建到 Slate 时,所有示例值都没有显示,只显示数据类型。
前任。大摇大摆地,我想要的是:
{
"cd": 0,
"data": {
"Num1": "113.90083333",
"Num2": "113.5991"
}
}
但是在构建后的 Slate 界面中,
{
"cd": "string",
"data": {
"Num1": "number",
"Num2": "number"
}
}
YAML 代码:
/mar:
get:
tags:
- MP
operationId: "MP1"
produces:
- application/json
responses:
200:
description: "WELL"
schema:
type: object
properties:
cd:
type: string
example: 0
data:
type: object
properties:
Num1:
type: number
example: "113.90083333"
Num2:
type: number
example: "113.5991"