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

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

相关推荐
QC班长1 天前
Maven公司私库配置踩坑点
java·服务器·maven·intellij-idea
Makoto_Kimur1 天前
java开发面试-AI Coding速成
java·开发语言
|晴 天|1 天前
Vue 3 + TypeScript + Element Plus 博客系统开发总结与思考
前端·vue.js·typescript
wuqingshun3141591 天前
说说mybatis的缓存机制
java·缓存·mybatis
空中海1 天前
Kubernetes 生产实践、可观测性与扩展入门
java·贪心算法·kubernetes
猫3281 天前
v-cloak
前端·javascript·vue.js
旷世奇才李先生1 天前
Vue 3\+Vite\+Pinia实战:企业级前端项目架构设计
前端·javascript·vue.js
Devin~Y1 天前
大厂Java面试实录:Spring Boot/Cloud、Kafka、Redis、K8s 与 Spring AI(RAG/Agent)三轮连环问
java·spring boot·redis·mysql·spring cloud·kafka·kubernetes
bLEd RING1 天前
SpringBoot3.3.0集成Knife4j4.5.0实战
java
小松加哲1 天前
Spring MVC 核心原理全解析
java·spring·mvc