miLibris / flask-rest-jsonapi

Flask extension to build REST APIs around JSONAPI 1.0 specification.
http://flask-rest-jsonapi.readthedocs.io
MIT License
597 stars 153 forks source link

Sparse fieldsets #211

Open erich-nuffsaid opened 3 years ago

erich-nuffsaid commented 3 years ago

Fix for https://github.com/miLibris/flask-rest-jsonapi/issues/209

Going to calculate the sparse field before calling the schema constructor rather than calling _init_fields again because they've labelled it explicitly as a private API.

Also, now if both and include and field[primary_type] parameters are passed, the included relationship must be present in the fields parameter because relationships are fields