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.
Developed in #1283, it is possible to define function scoped very simple types:
package main
// @Param request body main.Fun.request true "query params"
// @Success 200 {object} main.Fun.response
// @Router /test [post]
func Fun() {
type request struct {
Name string
}
type response struct {
Name string
Child string
}
}
But it fails when the request or response are more complex, for instance:
package main
// @Param request body main.Fun.request true "query params"
// @Success 200 {object} main.Fun.response
// @Router /test [post]
func Fun() {
type request struct {
Name string
}
type child struct {
Name string
}
type response struct {
Child child
}
}
Describe the solution you'd like
It would be nice to be able to define more complex request and response types.
Describe alternatives you've considered
It is of course possible to define more complex request and response types if the types are not function scoped.
This is not the preferred solution for my team as we find it clutters a bit.
Further information
I have made a suggestion about how to fix this here: #1813
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Developed in #1283, it is possible to define function scoped very simple types:
But it fails when the request or response are more complex, for instance:
Describe the solution you'd like
It would be nice to be able to define more complex request and response types.
Describe alternatives you've considered
It is of course possible to define more complex request and response types if the types are not function scoped.
This is not the preferred solution for my team as we find it clutters a bit.
Further information
I have made a suggestion about how to fix this here: #1813
The text was updated successfully, but these errors were encountered: