Skip to content

导入 RapJSON 提示格式错误 #46

@HamGuy

Description

@HamGuy

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)
      })

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions