func opResponsesSetter(op *spec.Operation) func(*spec.Response, map[int]spec.Response) { return func(def *spec.Response, scr map[int]spec.Response) { if op.Responses == nil { op.Responses = new(spec.Responses) } op.Responses.Default = def op.Responses.StatusCodeResponses = scr } }
func opSecurityDefsSetter(op *spec.Operation) func([]map[string][]string) { return func(securityDefs []map[string][]string) { op.Security = securityDefs } }
func opProducesSetter(op *spec.Operation) func([]string) { return func(produces []string) { op.Produces = produces } }
func opSchemeSetter(op *spec.Operation) func([]string) { return func(schemes []string) { op.Schemes = schemes } }
func opConsumesSetter(op *spec.Operation) func([]string) { return func(consumes []string) { op.Consumes = consumes } }