You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When specifying a response object type in the @success tag, having a type with two generic values like so:
type (
ResponseWithMetadata[T any, U any] struct {
Error *string `json:"error"`
Data T `json:"data"`
Metadata U `json:"metadata,omitempty"`
}
)
nesting it like this works: // @Success 200 {object} apiutils.ResponseWithMetadata[[]apisnapshot.SnapshotFramework, apiutils.Pagination]
but doing it like this:
type foo = apiutils.ResponseWithMetadata[[]apisnapshot.SnapshotFramework, apiutils.Pagination]
// @Success 200 {object} foo
creates this error:
2023/03/06 10:34:48 Generating github_com_messari_governor-service_internal_models_api_governance.GetGovernanceVotesResponse
2023/03/06 10:34:48 Type definition of type '*ast.IndexListExpr' is not supported yet. Using 'object' instead.
Your swag version
e.g .v1.8.10
Your go version
e.g. 1.19.0
Desktop (please complete the following information):
OS: MacOS
The text was updated successfully, but these errors were encountered:
Describe the bug
When specifying a response object type in the
@success
tag, having a type with two generic values like so:nesting it like this works:
// @Success 200 {object} apiutils.ResponseWithMetadata[[]apisnapshot.SnapshotFramework, apiutils.Pagination]
but doing it like this:
creates this error:
Your swag version
e.g .v1.8.10
Your go version
e.g. 1.19.0
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: