We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have domain model with uuid field and want use it as id value for API mapping.
uuid
id
I put uuid to getIdProperties, it is work fine for set id and links values in json. But I see uuid in attributes:
getIdProperties
Failed asserting that '{"data":{"type":"some_model","id":"foo-bar","attributes":{"name":"foo","uuid":"foo-bar"},"links":{"self":{"href":"/api/v1/some-models/foo-bar"}}},"links":{"self":{"href":"/api/v1/some-models/foo-bar"}},"jsonapi":{"version":"1.0"}}' matches JSON string "{ "data": { "type": "some_model", "id": "foo-bar", "attributes": { "name": "foo" }, "links": { "self": { "href": "/api/v1/some-models/foo-bar" } } }, "links": { "self": { "href": "/api/v1/some-models/foo-bar" } }, "jsonapi": { "version": "1.0" } }". --- Expected +++ Actual @@ @@ "type": "some_model", "id": "foo-bar", "attributes": { - "name": "foo" + "name": "foo", + "uuid": "foo-bar" }, "links": { "self": {
I try hide this property and use aliases, but I could not succeed with my case. I create repo with example: https://github.com/samizdam/jsonapi-example/blob/master/tests/Samizdam/JsonApiExampleTest/ModelWithUuidMappingTest.php
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have domain model with
uuid
field and want use it asid
value for API mapping.I put
uuid
togetIdProperties
, it is work fine for set id and links values in json.But I see
uuid
in attributes:I try hide this property and use aliases, but I could not succeed with my case.
I create repo with example:
https://github.com/samizdam/jsonapi-example/blob/master/tests/Samizdam/JsonApiExampleTest/ModelWithUuidMappingTest.php
The text was updated successfully, but these errors were encountered: