0

How to make a model for an empty list only? I have one now that looks like this:

config_model = api.model(
    'update_config_fields', {
        'some_key':
            fields.List(fields.String, required=True),
    }
)

This appears in the Swagger UI as shown:

{
  "some_key": [
    "string"
  ]
}

However, I am not trying to use a dictionary... I literally just want an empty list (the contents will always vary per request).

So in the Swagger UI, I just want it to appear as an empty [].

JeffSpicoli
  • 101
  • 1
  • 8

1 Answers1

0

Try to use example=[] argument while calling fields.List.