当前位置:网站首页>Swag init error: cannot find type definition: response Response
Swag init error: cannot find type definition: response Response
2022-07-01 09:35:00 【lsjweiyi】
Method source :https://www.jianshu.com/p/1837b37e03f8
go-admin The framework is configured with swagger Of , But when I changed the content , After adding your own excuse , Want to generate new swagger file , But it was wrong. :
ParseComment error in file xxx :cannot find type definition: response.Response
Then you see the definition on the interface swagger Parameters :
// ServerInfo Get system information
// @Summary system information
// @Description obtain JSON
// @Tags system information
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
// @Router /api/v1/server-monitor [get]
// @Security Bearer
there
@Success 200 {object} response.Response “{“code”: 200, “data”: […]}”
response.Response It's external dependence :“github.com/go-admin-team/go-admin-core/sdk/pkg/response”
In the project , I see that the dependency has been introduced :
import (
_ "github.com/go-admin-team/go-admin-core/sdk/pkg/response"
)
Because the dependency is not actually applied , So use a bar to comment out , But it initializes , That's enough .
Search findings , Originally, we had to add parameters , To identify external dependencies :
swag init --parseDependency --parseInternal
PS : I found out later , original go-admin They are ready , stay main.go in :
vs code With plug-ins , Direct point ”run go generate“ that will do
边栏推荐
- Latex插入的eps图片模糊解决方法
- ESP8266 FreeRTOS开发环境搭建
- 2.3 【kaggle数据集 - dog breed 举例】数据预处理、重写Dataset、DataLoader读取数据
- laravel postman 提交表单出现419错误。2020年7月6日记。
- Mikrotik Routeros Internet access settings
- nacos服务配置和持久化配置
- SQL learning notes (03) -- data constraint relationship
- 3D printing Arduino four axis aircraft
- SDN_简单总结
- 【电赛训练】红外光通信装置 2013年电赛真题
猜你喜欢
Error org apache. catalina. core. StandardContext. FilterStart start filter exception
nacos簡易實現負載均衡
Construction of esp8266 FreeRTOS development environment
Microcomputer principle - bus and its formation
delete和delete[]引发的问题
LVGL V8.2字符串显示在Keil MDK上需要注意的事项(以小熊派为例)
MapReduce编程基础
Structure de l'arbre - - - arbre binaire 2 traversée non récursive
[video game training] real topic of 2013 video game of infrared optical communication device
Tree structure -- binary tree 2 non recursive traversal
随机推荐
集成积木报表报错 org.apache.catalina.core.StandardContext.filterStart 启动过滤器异常
LeetCode 344. Reverse string
Learning practice: comprehensive application of cycle and branch structure (II)
【pytorch】transforms. Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
【ESP 保姆级教程】疯狂毕设篇 —— 案例:基于物联网的GY906红外测温门禁刷卡系统
OSPF - virtual link details (including configuration commands)
2.2 【pytorch】torchvision.transforms
PHP merges multiple arrays. The same element takes the intersection of different elements to form an array
SQL learning notes (02) - database table operation
Log4j log framework
HMS Core音频编辑服务3D音频技术,助力打造沉浸式听觉盛宴
JS原型链
ES6 const essence and completely immutable implementation (object.free)
122. Thread class thread method summary; Why is the thread start method start () not run ()?
Preparing for the Blue Bridge Cup -- bit operation
Problems caused by delete and delete[]
【leetcode】287. Find duplicates
The jar package embedded with SQLite database is deployed by changing directories on the same machine, and the newly added database records are gone
SQL学习笔记(03)——数据约束关系
SQL学习笔记(04)——数据更新、查询操作