jfinkels / flask-restless

NO LONGER MAINTAINED - A Flask extension for creating simple ReSTful JSON APIs from SQLAlchemy models.
https://flask-restless.readthedocs.io
GNU Affero General Public License v3.0
1.02k stars 301 forks source link

Using flask-restless together with flask-api #698

Open Madsn opened 5 years ago

Madsn commented 5 years ago

Flask-restless looks excellent, but I really like the browsable API offered by flaskAPI. The ability to send PUT/POST requests directly from the browsable API instead of postman/curl/etc. is appealing.

The issue is that the views that flask-restless returns out of the box are incompatible with what FlaskAPI expects, so FlaskAPI will ignore routes handled by flask-restless. See this comment from the FlaskAPI developer - https://github.com/flask-api/flask-api/issues/92

What I'm hoping to find is some option (or small hack) for flask-restless that will make it return a list or dictionary instead of json/html, and FlaskAPI would then handle returning html or json depending on the content type requested. Is that possible with flask-restless? So far I haven't had any luck finding anything in the docs that looks relevant.

Thanks in advance.