flask-restx icon indicating copy to clipboard operation
flask-restx copied to clipboard

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

Open vertighel opened this issue 1 year ago • 1 comments

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 avatar Aug 02 '22 11:08 vertighel

Was this task eventually foreseen?

vertighel avatar Feb 13 '24 17:02 vertighel