Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List Response Model #775

Open
Domhnall-Liopa opened this issue Feb 3, 2020 · 1 comment
Open

List Response Model #775

Domhnall-Liopa opened this issue Feb 3, 2020 · 1 comment

Comments

@Domhnall-Liopa
Copy link

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
Copy link
Collaborator

j5awry commented Feb 9, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants