So I already have a database defined in a specific way, and am building a JSON:API API around it probably using Flask-REST-JSONAPI.
The problem I am having is that some of the endpoints the API generates need to be significantly different to the database structure, and I don't want to build entirely new tables for lots of the same data because it's very dynamic and changing.
Can I build a complex query in sqlalchemy and then use that as a model? For a simple example if I need to join some tables, then filter the results, could I then turn that into a schema model to use with flask-rest-jsonapi?
If not (or if other solutions may be better suited) what other solution is there to this?