Open Midnighter opened 6 years ago
Using webargs like this is currently not supported, afaik.
Can you point me to any best practices, examples, or the like? There seem to be plenty of ways to achieve the same thing and I feel a little paralyzed choosing one option.
Can you show the code you tried with a use_kwargs
parser?
I had a similar problem. This will work if you use the use_kwargs decorator and you pass in a dictionary containing your file parameter. However, the parameter disappeared on the UI for me when I tried to pass in a Marshmallow Schema class
I'll post the code by next weekend latest. A bit under stress right now.
So I had a very simple file upload that worked beautifully with the swagger docs:
since the recommendation is to move to webargs, I did so and got the upload working but I'm struggling a little with getting the argument documented. I created a corresponding field and a
use_kwargs
parser. Putting the same line@api.doc(parser=...)
does not generate a documentation for the parameter, however. Also I'm wondering if there is a better option than using a basewebargs.fields.Field
for a file.