Replies: 1 comment
-
|
also having this issue |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If you use model like the one below, swag will not document it.
type User struct {
gorm.Model
// Username of the user
// @example johndoe
Username string
json:"username"// First name of the user
// @example John
FirstName string
json:"first_name"// Last name of the user
// @example Doe
LastName string
json:"last_name"// Email address of the user
// @example [email protected]
Email string
json:"email"// Password of the user (hashed)
// @example (not shown for security reasons)
Password string
json:"password" swaggerignore:"true"// "-" excludes from JSON, swaggerignore excludes from Swagger docs// Role of the user
// @example admin, user
Role string
json:"role"}
2024/08/08 13:53:07 Generating models.User
2024/08/08 13:53:07 Error parsing type definition 'models.User': : cannot find type definition: gorm.Model
2024/08/08 13:53:07 Skipping 'models.User', recursion detected.
2024/08/08 13:53:07 Skipping 'models.User', recursion detected.
Beta Was this translation helpful? Give feedback.
All reactions