0

My application has a possibility to take infinite query parameters like

<baseURL>/path?filter={value}&filter={value1}&filter={value2}&....filter={value999}

how do I document this on my YAML file and use swagger codegen to create API?

I came through the following YAML template:

in: query
name: template_id
description: some
required: false
type: array
items:
   type: int64

this will give me a scope as <baseURL>/path?filter={1,2,3...n} Is this the only way to do this?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Anil Pediredla
  • 704
  • 2
  • 8
  • 20

1 Answers1

1

collectionFormat: multi produces query string parameters as filter={value}&filter={value1}&...:

in: query
name: template_id
description: some
required: false
type: array
items:
   type: int64
collectionFormat: multi
Helen
  • 87,344
  • 17
  • 243
  • 314
Anil Pediredla
  • 704
  • 2
  • 8
  • 20