Requires #16
Closes #15 - Many record/invenio specific things have been moved to invenio-resources. See more at https://github.com/inveniosoftware/invenio-resources/issues/8.
Closes #4 - The resource class does not abort anymore. It returns the error code. How to treat it properlly needs to be addressed in #9 (see more below).
Errors and serialization
Note that the default resource returns a 405 code with no content and then the views call make_response by default. The default views are made to work with the resource test case (A.K.A. How would a user create an API with this). However, changes in this area are needed to:
1- Support the behaviour of the default resource, i.e. return a 405 forbidden error.
2- Do the distinction from error and successful response somewhere. Could we benefit from some other abstraction present in Flask/Other library?
This questions will and the whole error serialization will be treated separatelly in #3
Resources file hierarchy
The resource.py currently contains the Resource, the CollectionResource, the SingletonResource and the ResourceConfig classes. Should they be separated into different files? If yes:
Requires #16 Closes #15 - Many record/invenio specific things have been moved to
invenio-resources
. See more at https://github.com/inveniosoftware/invenio-resources/issues/8. Closes #4 - The resource class does notabort
anymore. It returns the error code. How to treat it properlly needs to be addressed in #9 (see more below).Errors and serialization Note that the default resource returns a 405 code with no content and then the views call
make_response
by default. The default views are made to work with the resource test case (A.K.A. How would a user create an API with this). However, changes in this area are needed to: 1- Support the behaviour of the default resource, i.e. return a 405 forbidden error. 2- Do the distinction from error and successful response somewhere. Could we benefit from some other abstraction present in Flask/Other library?This questions will and the whole error serialization will be treated separatelly in #3
Resources file hierarchy
The
resource.py
currently contains theResource
, theCollectionResource
, theSingletonResource
and theResourceConfig
classes. Should they be separated into different files? If yes:resources
folder?views
folder?The answer will depend from and be treated in https://github.com/inveniosoftware/flask-resources/issues/18
Naming 🎊
The
SerializerMixin
uses the wordobject
, which is reserved. Any suggestions for a change?