inveniosoftware / inveniosoftware/flask-resources
resources: rename to ResourceView
- Dominant language
- Python
- Stars
- 3
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
After talking IRL with @lnielsen, in context with what was discussed with @fenekku, we thought of renaming the `Resource` to `ResourceView`. This idea rose from the question "Should the resource return the **http** response code to the view?"
---
@lnielsen words:
Regarding e.g. Flask-RESTful and Flask-Resources: main issue is that none of the existing solutions is strong on content negotiation. E.g .flask restful adds 1) request parsing and 2) resourceful routing
Re 1), then webargs module does a lot better job
Re 2) resourceful routing, it basically doesn't add anything on top of a standard MethodView
and re. content negotiation it's too simplistic for our needs
The main thing that Flask-Resources adds is:
1) Gathering multiple view endpoints for a REST resource into a single view class
2) Decouples view from seralization/deserialization and allows this to be injected to the view
We used Flask-RESTful in Flask-IIIF and initially considered it for Invenio-Records-REST but in the end went with MethodView
Contributor guide
Assessment
This issue has not been assessed yet.