Open shukranjs opened 1 year ago
wondering if you can share the code. Meanwhile try as per the README.md or something like,
@api.doc("create_todo")
@api.expect(todo)
@api.marshal_with(todo, code=201)
def post(self):
"""Create a new task"""
return DAO.create(api.payload), 201
as both seem to send data as form in swagger
Keep posted how that goes. :-)
How to upload file using this structrue?
On Fri, Jul 7, 2023, 07:39 :-) @.***> wrote:
wondering if you can share the code. Meanwhile try as per the README.md https://github.com/chipndell/flask-restx#quick-start or something like,
@api.doc("create_todo") @api.expect(todo) @api.marshal_with(todo, code=201) def post(self): """Create a new task""" return DAO.create(api.payload), 201
as both seem to send data as form in swagger
Keep posted how that goes. :-)
— Reply to this email directly, view it on GitHub https://github.com/python-restx/flask-restx/issues/546#issuecomment-1624621510, or unsubscribe https://github.com/notifications/unsubscribe-auth/APO5GPRCD5MZVCEJTV22WPDXO6AHDANCNFSM6AAAAAAY36TH6M . You are receiving this because you authored the thread.Message ID: @.***>
Here is Link to Doc for that.
I want to send data in formData in swagger but it returns None. However, it displays that it is multipart/form-data but returns None