Comments (1)
When returning to an object:ImgWorkRes, if there is a struct: ImgWorkRes in the object, swag will not parse the contents of the struct:ImgWorkRes.
for example:
my code
type ImgWorkRes struct {
models.Work
CanLike booljson:"can_like"
CanFollow booljson:"can_follow"
CanCollect booljson:"can_collect"
}
// @summary 获取作品详情
// @produce json
// @param id path int true "作品id 默认 0"
// @param token query string false "token"
// @success 200 {object} v1.ImgWorkRes "成功"
// @failure 400 {object} e.HTTPError "客户端请求错误"
// @failure 401 {object} e.HTTPError "授权错误"
// @failure 422 {object} e.HTTPError "字段验证错误"
// @failure 404 {object} e.HTTPValidError "找不到资源错误"
// @failure 500 {object} e.HTTPError "服务器错误"
// @router /api/v1/img_work/{id} [get]swag api doc
{
"can_collect": true,
"can_follow": true,
"can_like": true
}
I have the same problem, have you solved it
from gin-swagger.
Related Issues (20)
- support for 'main' package outside of project root
- use go work report swaggerFiles could not import error
- Using gin-swagger encountered a javascript error, causing the google browser not to display the swagger api page, the javascript error is as follows HOT 3
- Swagger comments in Go files are not recursively parsed by Swaggo HOT 2
- Getting all defined routes in swagger
- Question how to specify []string type in formData. HOT 1
- support for function scoped struct in type method
- Why is disabling try it out still not supported?
- Support OpenAPI 3.1
- Enable annotation readOnly HOT 1
- Serve Swagger UI on custom route without path or path extensions HOT 1
- Support for discriminator
- GO-2023-1988 found in golang.org/x/net/html
- zsh: command not found: swag HOT 2
- Option to change the order/sorting of endpoints is not supported
- Is there no way to support the sorting of interfaces under this classification? HOT 1
- Cannot find type definition: dto.CreateCityRequest HOT 1
- Error install v1.6.0
- swag init can't generate api info in swagger.json
- swagger-ui Parser error on line 13 end of the stream or a document separator is expected
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gin-swagger.