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
Is your feature request related to a problem? Please describe.
Using the gin framework, we have the handlers generally defined in a "service struct". The handlers often define their own input and output structs. The current function scoped struct support does not handle this case.
package bob
type service struct {}
// @success 200 {object} bob.service.handleARequest.output "object containing the A"
func (s *service) handleARequest(ctx *gin.context) {
type input struct {}
type output struct {A int}
c.JSON(http.StatusOK, output{A:5}
}
Describe the solution you'd like
Extend the function scoped struct feature to support methods of a type.
Describe alternatives you've considered
Pulling the struct out of the method works but is not the desired solution.
Additional context
If this is desirable, I can probably add it.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Using the gin framework, we have the handlers generally defined in a "service struct". The handlers often define their own input and output structs. The current function scoped struct support does not handle this case.
package bob
type service struct {}
// @success 200 {object} bob.service.handleARequest.output "object containing the A"
func (s *service) handleARequest(ctx *gin.context) {
type input struct {}
type output struct {A int}
c.JSON(http.StatusOK, output{A:5}
}
Describe the solution you'd like
Extend the function scoped struct feature to support methods of a type.
Describe alternatives you've considered
Pulling the struct out of the method works but is not the desired solution.
Additional context
If this is desirable, I can probably add it.
The text was updated successfully, but these errors were encountered: