-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong specification #40
Comments
Please provide a full code example or preferably a failing test. Right now I don't know if you use jsonapi-requests in ORM or in raw mode. In raw mode everything works as intended. The following test uses raw "get" and passes. You should look at def test_get_relationships(api_configuration, request_mock):
valid_response = mock.Mock(status_code=200)
valid_response.json.return_value = {
'data': {
'relationships': {
'vendor': {
'links': {
"self": "http://example.org/api/rest/admin/gateway-groups/14/relationships/vendor",
"related": "http://example.org/api/rest/admin/gateway-groups/14/vendor",
}
}
}
}
}
request_mock.return_value = valid_response
response = request_factory.ApiRequestFactory(api_configuration).get('endpoint')
assert response.data.relationships['vendor'] == data.Relationship.from_data({
'links': {
'self': 'http://example.org/api/rest/admin/gateway-groups/14/relationships/vendor',
'related': 'http://example.org/api/rest/admin/gateway-groups/14/vendor'
}
}) |
ORM mode |
@5ghz Please provide me with code example presenting the issue or (preferably) a failing test - with would greatly improve communication :) |
Good day, please review patch. |
jsonapi-requests is not JSON API compatible. Because if server returns this relationship obejct:
But in http://jsonapi.org/format/#document-resource-object-relationships
Project must support this.
The text was updated successfully, but these errors were encountered: