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
{{ message }}
Repository navigation
docs(client): how to handle duplicate names in generated types #1965
For posterity, this still can occur when using the Client generation, i.e.:
internal/endoflifedate/client/client.gen.go:976:6: ProductResponse redeclared in this block
internal/endoflifedate/client/client.gen.go:187:6: other declaration of ProductResponse
internal/endoflifedate/client/client.gen.go:984:7: r.HTTPResponse undefined (type ProductResponse has no field or method HTTPResponse)
From code:
// ProductReleaseResponse A response containing a release cycle.typeProductReleaseResponsestruct {
// Result Full information about a product release cycle.ResultProductRelease`json:"result"`// SchemaVersion Version of this schema.SchemaVersionstring`json:"schema_version"`
}
// ClientWithResponsesInterface is the interface specification for the client with responses above.typeClientWithResponsesInterfaceinterface {
// ProductReleaseWithResponse requestProductReleaseWithResponse(ctx context.Context, productstring, releasestring, reqEditors...RequestEditorFn) (*ProductReleaseResponse, error)
}
typeProductReleaseResponsestruct {
Body []byteHTTPResponse*http.ResponseJSON200*ProductReleaseResponse
}
// Status returns HTTPResponse.Statusfunc (rProductReleaseResponse) Status() string {
ifr.HTTPResponse!=nil {
returnr.HTTPResponse.Status
}
returnhttp.StatusText(0)
}
This can be overridden when using output-options.response-type-suffix:
Activity
docs(client): document known issue with duplicated `Response` models