0

I am using https://github.com/rochacbruno/flasgger for swagger in my python-flask application. I need to send an array of dictionaries (or json) in the value of a parameter. But I couldn't find any such type in the documentation of swagger (https://swagger.io/docs/specification/2-0/describing-parameters/). Any Suggestions on how users are achieving this?

davidism
  • 121,510
  • 29
  • 395
  • 339
Kshitij Mittal
  • 2,698
  • 3
  • 25
  • 40

1 Answers1

3

Here is an example of a property called test that holds an array of String-String dictionaries:

      test:
        type: array
        items:
          type: object
          additionalProperties:
            type: string

Hope I can help you. A similar answer, describing the additionalProperties field, was given here: https://stackoverflow.com/a/41242185/8745384

Florian Schlag
  • 639
  • 4
  • 16