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.14k stars 333 forks source link

How can Model represent a non-json schema for the swagger example? #585

Open renjiandreamore opened 8 months ago

renjiandreamore commented 8 months ago

Ask a question For example I have an API that will return a 'text/plain' type response, but when I use @api/namespace.response it only allow me to pass a Model instance into, and the model is actually a json-like(dict) thing, and in the swagger api I will see something like {"response_key": "response_value"}, however my actually response is just a text, so there is no json-like response actually. How can I represent the example in the swagger doc?