自学内容网 自学内容网

使用openapi生成前端请求文件报错 ‘Token “Integer“ does not exist.‘

{
  stack: 'JSONParserError: Token "Integer" does not exist.\n' +
    '    at Pointer.resolve (F:\\IdeaProjects\\yu-oj\\oj-frontend\\node_modules\\@apidevtools\\json-schema-ref-parser\\dist\\lib\\pointer.js:103:23)\n' +
  name: 'MissingPointerError',
  message: 'Token "Integer" does not exist.',
  source: 'http://localhost:8101/api/v2/api-docs',
  path: null,
  toJSON: [Function: toJSON],
  footprint: 'null+http://localhost:8101/api/v2/api-docs+EUNMATCHEDRESOLVER+Token "Integer" does not exist.',
  toString: [Function: toString]
}

这时候你可能会觉得是后端接口的controller方法的参数写的有问题。
最后我找到了问题,就是有一个controller返回的是RMap(Redis里的一个数据结构)。只需要把这个map转为其他结构就行
其实,之前我直接用map也可以跑(我还没找到具体原因),总之问题解决了。

如果你遇到同样的问题,就排查接口,挨个排查,总能找到答案的。


原文地址:https://blog.csdn.net/qq_53674101/article/details/142718781

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!