swagger-converter icon indicating copy to clipboard operation
swagger-converter copied to clipboard

Convert collectionFormat #2 - formData (application/x-www-form-urlencoded)

Open hkosova opened this issue 8 years ago • 0 comments

Spec: https://gist.githubusercontent.com/hkosova/f0b1ace631a93c3acc42bca0e1ae6928/raw/459e67fa395c30abdcb54ea02120075d28510f23/formData-collectionFormat.yaml

Converted spec: http://oai.swagger.io/api/convert?url=https://gist.githubusercontent.com/hkosova/f0b1ace631a93c3acc42bca0e1ae6928/raw/459e67fa395c30abdcb54ea02120075d28510f23/formData-collectionFormat.yaml

1 No collectionFormat or collectionFormat: csv should be converted to:

encoding:
  paramName:
    #style: form    # `style` defaults to `form`, so this line is optional
    explode: false

2 collectionFormat: ssv should be converted to:

encoding:
  paramName:
    style: spaceDelimited
    #explode: false     # optional - this is the default value

3 collectionFormat: tsv should be ignored (?)

4 collectionFormat: pipes should be converted to:

encoding:
  paramName:
    style: pipeDelimited
    #explode: false     # optional - this is the default value

5 collectionFormat: multi corresponds to the default seralization style (style: form + explode: true), and can be either ignored, or converted to one of the following:

encoding:
  paramName:
    style: form

encoding:
  paramName:
    explode: true

encoding:
  paramName:
    style: form
    explode: true

hkosova avatar Sep 18 '17 16:09 hkosova