sqlalchemy-jsonapi
sqlalchemy-jsonapi copied to clipboard
JSONAPI implementation for use with SQLAlchemy
It is very important that the library is able to return some sort of response that let's the user know they submitted an invalid request by raising a BadRequestError and...
It is very important that the library is able to return some sort of response that let's the user know they submitted an invalid request by raising a BadRequestError and...
Here is a test that should return a BadRequestError: ``` def test_add_resource_with_invalid_relationships(self): """Create resource with unknown OneToMany relationship key returns 400. A BadRequestError is raised. """ payload = { 'data':...
Looking at the `patch_resource` function, we have ``` def patch_resource(self, session, json_data, api_type, obj_id): """ Replacement of resource values. :param session: SQLAlchemy session :param json_data: Request JSON Data :param api_type:...
For background information let's look at this test: ``` def test_add_resource_with_invalid_relationships(self): """Create resource with invalid relationship returns 400. A BadRequestError is raised. """ payload = { 'data': { 'attributes': {...
Hey there, I'll take a look at serializer again later this week, but from my side it looks like query parameters aren't implemented. From the spec: > Implementation specific query...
General Changes: - [ ] Addition of Ember-compatible filtering - [ ] Query modification - [ ] Extended filtering - [ ] Default pagination settings - [ ] Binary data...
``` def post_collection(self, session, data, api_type): """ Create a new Resource. :param session: SQLAlchemy session :param data: Request JSON Data :param params: Keyword arguments """ model = self._fetch_model(api_type) self._check_json_data(data) orm_desc_keys...
In a shell: ``` import errors raise errors.ValidationError("foo") --------------------------------------------------------------------------- ValidationError Traceback (most recent call last) in () ----> 1 raise errors.ValidationError("foo") ValidationError: ``` This is because the error classes do...
When adding model field validation with sqlalchemy's `@validates` decorator as illustrated in the docs I get the error `AttributeError: 'AssertionError' object has no attribute 'msg'`. It seems `sqlalchemy-jsonapi` is [trying...