Open AndyMan1 opened 6 years ago
I would also like to be able to do this. As best as I can tell from the Swagger generation code (https://flask-restplus.readthedocs.io/en/stable/_modules/flask_restplus/swagger.html), the "consumes" is forced into a few hard-coded values and cannot be overridden. The default is application/json and each operation may override the consumes to either ['multipart/form'] or [application/x-www-form-urlencoded', 'multipart/form-data'], but never 'text/plain'.
I'm trying to create a POST endpoint where the payload is just plain raw text. I can't seem to find a way to do so.
Essentially what I'd like is a swagger/flask-restplus way to handle the following curl command:
It looks like the proper swagger to display this is possible, as seen here (scroll to Primitive Body heading): https://swagger.io/docs/specification/2-0/describing-request-body/
But I can't seem to manage this with either a Model or the RequestParser. Is this possible?