noirbizarre / flask-restplus

Fully featured framework for fast, easy and documented API development with Flask
http://flask-restplus.readthedocs.org
Other
2.74k stars 506 forks source link

List Response Model #775

Open Domhnall-Liopa opened 4 years ago

Domhnall-Liopa commented 4 years ago

I want to document my response model as a list of strings like:

[
    "value1", 
    "value2"
]

which is valid JSON. So I want to be able to do something like:

response_model = ns.model('Response', [
    fields.String()
])

Is there a way of doing this currently without having to use a dict object in ns.model?

j5awry commented 4 years ago

NOTE: flask-restplus development has stopped. Support from previous maintainers will only occur on the new project. An official for by previous maintainers is available at https://github.com/python-restx/flask-restx and on pypi