-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot find type definition: sql.NullTime #1739
Comments
debug it. |
I've tried, or i wouldn't have raised it as a bug. If there is something you think i'm missing can you at least give me a pointer? |
You have to check your swag version by cmd |
I have also tried model you gave above with the newest swag tool. It work well. |
Same issue |
use AvailableDatetime sql.NullTime `json:"available_datetime" swaggertype: "string"` |
Describe the bug
When executing:
swag init --md ./docs --parseInternal --parseDependency --parseDepth 2
Receiving error:
ParseComment error in file /Users/morgan/leadgen/data-ms/routes/content.go :cannot find type definition: sql.NullTime
To Reproduce
Steps to reproduce the behavior:
Execute
swag init --md ./docs --parseInternal --parseDependency --parseDepth 2
with a gorm model in your swagger comment spec.Example:
Gorm Model:
Swagger Comment:
Expected behavior
Swagger docs to be generated successfully
Your swag version
Your go version
e.g. 1.21.5
Additional info:
I have tried the solution specified in #1228 with .swaggo file in the root of the project but am still getting this issue.
Gorm version: gorm.io/gorm v1.25.5
The text was updated successfully, but these errors were encountered: