Skip to content
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

Flags to parse internal and dependency package #1894

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bytesByHarsh
Copy link

Remove cannot find type definition error

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant