python-restx / flask-restx

Fork of Flask-RESTPlus: Fully featured framework for fast, easy and documented API development with Flask
https://flask-restx.readthedocs.io/en/latest/
Other
2.16k stars 335 forks source link

simple json in swagger payload field, and not only {key:value} pairs #464

Open vertighel opened 2 years ago

vertighel commented 2 years ago

Is your feature request related to a problem? Please describe. @api.expect(model) and @api.doc(body=model) want a model which must be at least a {"key":value} pair to be shown in Swagger documentation "payload" field.

Describe the solution you'd like strings, bare booleans, null, arrays and numbers are valid JSON too. I would like that things such @api.expect(fields.Boolean) and/or @api.doc(body=bool) work too in Swagger documentation "payload" field.

vertighel commented 9 months ago

Was this task eventually foreseen?