Swagger UI not sending array correctly

余生颓废 提交于 2019-11-29 17:05:28

It looks like the way to specify this is to add collectionFormat: multi

- name: recipients[]
  in: formData
  description: Email addresses for recipients (multiple values allowed).
  required: true
  type: array
  collectionFormat: multi
  items:
      type: string

Possible values from http://swagger.io/specification/ are:

  • csv - comma separated values foo,bar.
  • ssv - space separated values foo bar.
  • tsv - tab separated values foo\tbar.
  • pipes - pipe separated values foo|bar.
  • multi - corresponds to multiple parameter instances instead of multiple values for a single instance foo=bar&foo=baz. This is valid only for parameters in "query" or "formData".
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!