package model
type PaginatedListResp[T any] struct {
Data []T `json:"data"`
TotalCount int `json:"total_count"`
HasMore bool `json:"has_more"`
Page int `json:"page"`
ItemsPerPage int `json:"items_per_page"`
}
type User struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
PhoneNum string `json:"phone_number"`
Email string `json:"email"`
Username string `json:"username"`
}
package api
.
.
.
// @Success 200 {object} models.PaginatedListResp[models.User]
Additional context
If the model is part of an external dependency or internal package then flags mentioned in the PR can be used but were not mentioned in the generics section.
In some cases simple import _ github.com/xxx/models also works but if it does not then adding either --parseDependency or --parseInternal helps in solving the issue based on requirement.
Remove cannot find type definition error
Additional context If the model is part of an external dependency or internal package then flags mentioned in the PR can be used but were not mentioned in the generics section.
In some cases simple
import _ github.com/xxx/models
also works but if it does not then adding either--parseDependency
or--parseInternal
helps in solving the issue based on requirement.