mirror of
https://github.com/YMFE/yapi.git
synced 2025-03-01 14:05:44 +08:00
fix: swagger 导入 code 判断bug
This commit is contained in:
parent
7a8367a322
commit
76702415d1
@ -232,9 +232,10 @@ const swagger = require('swagger-client');
|
||||
let codes = Object.keys(api);
|
||||
let curCode;
|
||||
if (codes.length > 0) {
|
||||
if (codes.indexOf(200) > -1) {
|
||||
curCode = 200;
|
||||
if (codes.indexOf('200') > -1) {
|
||||
curCode = '200';
|
||||
} else curCode = codes[0];
|
||||
|
||||
let res = api[curCode];
|
||||
if (res && typeof res === 'object') {
|
||||
if (res.schema) {
|
||||
|
Loading…
Reference in New Issue
Block a user