Closed Yi-Xing closed 2 years ago
请提供测试数据 @Yi-Xing
{"openapi":"3.0.3","info":{"title":"aaaa","description":"aaaaa。","contact":{"name":"David","url":"https://github.com/aaaa","email":"1156490000@qq.com"},"version":"0.0.1"},"servers":[{"url":"http://zx.wm.com:80","description":"Inferred Url"}],"tags":[{"name":"应用申请","description":"App Apply Controller"},{"name":"应用订购","description":"App Ordering Controller"}],"paths":{"/app/queryAppInfo":{"post":{"tags":["应用订购"],"summary":"查询应用信息","operationId":"queryAppInfoUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppInfoQuery"}}}},"responses":{"200":{"description":"OK","content":{"/":{"schema":{"$ref":"#/components/schemas/返回数据«AppInfoVo»"}}}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}}},"components":{"schemas":{"AppInfoQuery":{"title":"AppInfoQuery","required":["appCode","venderId"],"type":"object","properties":{"appCode":{"type":"string","description":"应用编码"},"venderId":{"type":"integer","description":"店铺Id","format":"int64"}}},"返回数据«AppInfoVo»":{"title":"返回数据«AppInfoVo»","type":"object","properties":{"code":{"type":"integer","format":"int32"},"data":{"$ref":"#/components/schemas/AppInfoVo"},"extData":{"type":"string"},"message":{"type":"string"},"success":{"type":"boolean"},"totalCount":{"type":"integer","format":"int64"}}}}}}
@Yi-Xing 你这数据不标准吧 https://editor.swagger.io/ 去这个网站验证下吧
把 responses 中 200下的 content 下的 /
改为 application/json
展示正常 @Yi-Xing
已解决,谢谢。我这个数据就是Swagger直接导出的,你的Swagger用的是什么版本的。
"swagger-client": "3.5.1"
版本号
Swagger 版本
Yapi版本,我使用你们提供的体验地址,也会出现问题。
什么问题
使用 Swagger 进行接口导入,请求参数可以导入进,但返回数据导入不进(总是显示OK)。
如何复现此问题
使用 Swagger 生成 api-docs 然后导入 Yapi 中。
什么浏览器
谷歌
什么系统
Windows