YMFE / yapi

YApi 是一个可本地部署的、打通前后端及QA的、可视化的接口管理平台
http://yapi.smart-xwork.cn/
Apache License 2.0
27.38k stars 4.79k forks source link

JSON Schema 规范兼容不完整 #1787

Open zycgit opened 4 years ago

zycgit commented 4 years ago

版本号

~ 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 。

image

什么浏览器

~ 谷歌浏览器

什么系统(Linux, Windows, macOS)

macOS

caoqiqi commented 3 years ago

+1

xtuqfpygl commented 3 years ago

+1