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

json 复制代码
{
  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也可以跑(我还没找到具体原因),总之问题解决了。

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

相关推荐
何仙鸟7 分钟前
GarmageSet下载和处理
java·开发语言
wefly201712 分钟前
免安装!m3u8live.cn在线 M3U8 播放器,小白也能快速上手
java·开发语言·python·json·php·m3u8·m3u8在线转换
yuweiade14 分钟前
springboot和springframework版本依赖关系
java·spring boot·后端
ywf121515 分钟前
springboot设置多环境配置文件
java·spring boot·后端
爱学习的程序媛23 分钟前
【Web前端】JavaScript设计模式全解析
前端·javascript·设计模式·web
小马爱打代码27 分钟前
SpringBoot + 消息生产链路追踪 + 耗时分析:从创建到发送,全链路性能可视化
java·spring boot·后端
小码哥_常29 分钟前
MyBatis批量插入:从5分钟到3秒的逆袭之路
后端
小码哥_常32 分钟前
从SharedPreferences到DataStore:Android存储进化之路
前端
老黑41 分钟前
开源工具 AIDA:给 AI 辅助开发加一个数据采集层,让 AI 从错误中自动学习(Glama 3A 认证)
前端·react.js·ai·nodejs·cursor·vibe coding·claude code
jessecyj1 小时前
Spring boot整合quartz方法
java·前端·spring boot