about swagger serve
Thanks for this amazing project. I am using goctl api swagger command to generate swagger file and notice that there is no comment or discribe about feild, defined in api file like PageData { //Total data count Total int64 `json:"total,example=1234"` //Number of items per page, consistent with the request Limit int `json:"limit,example=10"` //Data offset, consistent with the request Offset int `json:"offset,example=0,default=0"` }.
And how to serve the swagger UI using go zero?
For the first question, would you please describe what's the current generated content and what's your expected content?
For your second question about serving Swagger UI - that's not a go-zero feature. After generating the swagger.json file, you need to:
- Use a separate tool like swagger-ui
- Or serve it via a web server
- Or use online tools like Swagger Editor