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

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

相关推荐
果果软件2 小时前
2026 后台管理系统选型:若依、JeecgBoot、芋道、NocoBase 和 GewuMind Boot 怎么选?
java·人工智能·后端·ai·开源
码云社区6 小时前
Java家政服务系统源码:人员技能、服务范围与多商家业务落地
java·开发语言·家政服务·家政小程序·家政系统
FRing036 小时前
vue3干货总结3(defineOptions(Vue3.3)、defineModel(Vue3.4)、Pinia)
开发语言·前端·vue.js·vue3
Bczheng16 小时前
组件化服务端渲染模式SSR
前端
Sashtok6 小时前
cpp基础知识(10)
c++·后端
摇滚侠7 小时前
《On Java 中文版 基础卷》阅读笔记 接口 18
java·笔记·python
CoderYanger7 小时前
Java EE 进阶:9.MyBatis 操作数据库(进阶)(第八弹):MyBatis Generator
java·数据库·spring boot·spring·java-ee·tomcat·mybatis
行百里er7 小时前
【Spring Insight 技术分享】runtime-settings.json 的妙用
后端·开源·监控
whitelbwwww8 小时前
CUDA C++实战--中级
开发语言·前端·c++
张紫娃8 小时前
Chrome插件-Stylus(屏蔽博客广告)
前端·chrome·stylus