Skip to content

Wrong pointer for relationships #95

@sergiufreemind

Description

@sergiufreemind

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" } } ] }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions