fix: 因 swagger 部分api定义不规范,导致所有接口无法导入问题

This commit is contained in:
suxiaoxin 2017-12-07 14:40:46 +08:00
parent 290f8c5505
commit 9b7271bdce

View File

@ -34,7 +34,16 @@ function improtData(importDataModule){
_.each(apis, (api, method)=>{
api.path = path;
api.method = method;
interfaceData.apis.push(handleSwagger(api));
let data = null;
try{
data = handleSwagger(api)
}catch(err){
data = null;
}
if(data){
interfaceData.apis.push(data);
}
})
})