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
how to response different field of response struct by different routes?
type Envelope struct {
Field1 Object1
Field2. Object2
}
// Get swagger:route GET /Field1s
// Get Fields2
// Responses:
// 200: body:Envelope
func handler1() {
}
// Get swagger:route GET /Field2s
// Get Field2s
// Responses:
// 200: body:Envelope
func handler2() {
}
all of my handlers return Envelope struct as response body
but use specific field
in route2 I don't want Field1 in response or Field1 = null is ok
how to do this? thanks
Swagger specification
Steps to reproduce
Environment
swagger version: 0.27.0
go version: 1.13.1
OS: macos