alovajs / devtools

Editor devtools for alova.js
MIT License
9 stars 5 forks source link

当`responses`为`unknown`时,`handleApi`中修改的层级结构会失效 #29

Closed JOU-amjs closed 2 months ago

JOU-amjs commented 2 months ago

alova.config.js中是这样设置的,对responses外包了一层

export default {
  // ...
  handleApi: apiDescriptor => {
    apiDescriptor.responses = {
      type: 'object',
      properties: {
        code: {
          type: 'number'
        },
        msg: {
          type:'string'
        },
        data: apiDescriptor.responses
      }
    };
  }
}

responses有数据结构的接口是正常的

image

但如果接口的responsesunknown时则会失效,如下:

image

复现项目: API-V3-TS-TEST