request-bodies.tmpl 347 B

12345678910
  1. {{range .}}{{$opid := .OperationId}}
  2. {{if (hasValidRequestAndResponse .) -}}{{/* skip non-JSON bodies*/}}
  3. {{range .Bodies}}
  4. {{with .TypeDef $opid}}
  5. // {{.TypeName}} defines body for {{$opid}} for application/json ContentType.
  6. type {{.TypeName}} {{if and (opts.AliasTypes) (.CanAlias)}}={{end}} {{.Schema.TypeDecl}}
  7. {{end}}
  8. {{end}}
  9. {{end}}
  10. {{end}}