Skip to content
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 pointer for relationships #95

Open
sergiufreemind opened this issue Dec 11, 2023 · 0 comments
Open

Wrong pointer for relationships #95

sergiufreemind opened this issue Dec 11, 2023 · 0 comments

Comments

@sergiufreemind
Copy link

In file ValidationErrorDocument pointer is hardcoded to display attributes:
$pointer = '/data/attributes/'.$fieldError->getPropertyPath();

if i have validation error in my relationship then i will still receive in errors pointer to attributes, not to relationships.

actual result :
{ "jsonapi": { "version": "1.0" }, "errors": [ { "detail": "This value should not be blank.", "source": { "pointer": "/data/attributes/branch", "parameter": "Invalid Value" } } ] }

expected:

{ "jsonapi": { "version": "1.0" }, "errors": [ { "detail": "This value should not be blank.", "source": { "pointer": "/data/relationships/branch", "parameter": "Invalid Value" } } ] }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant