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
  • 110,080
  • 24
  • 357
  • 317
Kshitij Mittal
  • 2,515
  • 3
  • 22
  • 37

1 Answers1

2

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
  • 580
  • 4
  • 16