yapi JSON Schema 规范兼容不完整

5uzkadbs  于 2022-11-05  发布在  其他
关注(0)|答案(2)|浏览(199)

版本号

~ 1.5.0

什么问题

{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/ApiType_33_2",
"definitions": {
"ApiType_33_4": {
"type": "object",
"properties": {
"recordPosition": {
"type": "number"
},
"enable": {
"type": "boolean"
},
"totalPage": {
"type": "number"
},
"pageSize": {
"type": "number"
},
"totalCount": {
"type": "number"
},
"currentPage": {
"type": "number"
}
}
},
"ApiType_33_6": {
"type": "object",
"properties": {
"sex": {
"type": "number"
},
"name": {
"type": "string"
},
"id": {
"type": "number"
}
}
},
"ApiType_33_3": {
"type": "object",
"properties": {
"pageInfo": {
"$ref": "#/definitions/ApiType_33_4"
},
"pageData": {
"type": "array",
"items": {
"$ref": "#/definitions/ApiType_33_6"
}
}
}
},
"ApiType_33_2": {
"type": "object",
"properties": {
"executionTime": {
"type": "number"
},
"code": {
"type": "number"
},
"success": {
"type": "boolean"
},
"lifeCycleTime": {
"type": "number"
},
"message": {
"type": "string"
},
"value": {
"$ref": "#/definitions/ApiType_33_3"
}
}
}
}
}

如何复现此问题

~ 导入后无法识别,经过反复确认。 YAPI 应该是没有规范中的支持 $ref 。

什么浏览器

~ 谷歌浏览器

什么系统(Linux, Windows, macOS)

macOS

相关问题