-
Notifications
You must be signed in to change notification settings - Fork 180
Open
Labels
Description
Rap 更新了,数据结构不匹配,导入 Rap JSON 出现格式错误。简单修改了下(FromRap.vue),可以导入API 描述,但是参数和响应都没有:
moduleList = json.data.modules[0]
const apis = []
moduleList.interfaces.forEach(action => {
window.console.log(action)
const apiName = `${json.data.name}-${action.name}`
const api = new ApiInit()
api.name = apiName
api.desc = action.description
api.prodUrl = action.url
api.group = this.group._id
const requestType = Number(action.method)
api.options.method = this.methods[requestType - 1]
const requests = action.properties.filter(p => p.scope === 'request')
const responses = action.properties.filter(p => p.scope === 'response')
api.options.params = this.buildReqParams(api.options.params, requests, requestType)
api.options.response = this.buildResponse(responses)
apis.push(api)
})Reactions are currently unavailable