当前位置:网站首页>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
边栏推荐
- 2.4 激活函数
- Spark's action operator
- JS prototype chain
- 【ESP 保姆级教程】疯狂毕设篇 —— 案例:基于物联网的GY906红外测温门禁刷卡系统
- Mikrotik Routeros Internet access settings
- ES6-const本质与完全不可改实现(Object.freeze)
- Problems caused by delete and delete[]
- 【pytorch】nn.CrossEntropyLoss() 与 nn.NLLLoss()
- Youqitong PE toolbox [vip] v3.7.2022.0106 official January 22 Edition
- [pytorch] 2.4 convolution function nn conv2d
猜你喜欢

PR training notes

2.2 【pytorch】torchvision.transforms

【pytorch】nn.CrossEntropyLoss() 与 nn.NLLLoss()

Spark's action operator

How to launch circle of friends marketing and wechat group activities

3D printing Arduino four axis aircraft

【pytorch】softmax函数
![2.3 [kaggle dataset - dog feed example] data preprocessing, rewriting dataset, dataloader reading data](/img/6e/d8ef618127ac492f5142f7b600266d.png)
2.3 [kaggle dataset - dog feed example] data preprocessing, rewriting dataset, dataloader reading data

Imitation of Baidu search results top navigation bar effect

Mikrotik Routeros Internet access settings
随机推荐
【pytorch】2.4 卷积函数 nn.conv2d
js函数arguments对象
微信小程序 webview 禁止页面滚动,同时又不影响业务内overflow的滚动的实现方式
tensorrt yolov5_ trt. Py comments
Principle and application of single chip microcomputer timer, serial communication and interrupt system
js重写自己的函数
记一次redis超时
122. Thread class thread method summary; Why is the thread start method start () not run ()?
Log4j log framework
dotnet 控制台 使用 Microsoft.Maui.Graphics 配合 Skia 进行绘图入门
JS prototype trap
Unity tips for reducing the amount of code -- empty protection extension
2.3 【kaggle数据集 - dog breed 举例】数据预处理、重写Dataset、DataLoader读取数据
集成积木报表报错 org.apache.catalina.core.StandardContext.filterStart 启动过滤器异常
Concept of digital currency
[interview brush 101] linked list
樹結構---二叉樹2非遞歸遍曆
OSPF - virtual link details (including configuration commands)
LVGL V8.2字符串显示在Keil MDK上需要注意的事项(以小熊派为例)
Principles of Microcomputer - internal and external structure of microprocessor