Skip to content

Add support for header in ErrorSource object (JSON:API 1.1 compliance) #150

@bansalHritik

Description

@bansalHritik

Description:
The current implementation of the ErrorSource class in src/JsonApiSerializer/JsonApi/Error.cs only includes support for Pointer and Parameter members.

According to the JSON:API v1.1 Specification [link], the source object of an error can now optionally include a header member:

source: an object containing references to the primary source of the error. It SHOULD include one of the following members or be omitted:
pointer: a JSON Pointer [RFC6901] to the value in the request document that caused the error [e.g. "/data" for a primary data object, or "/data/attributes/title" for a specific attribute]. This MUST point to a value in the request document that exists; if it doesn’t, the client SHOULD simply ignore the pointer.
parameter: a string indicating which URI query parameter caused the error.
header: a string indicating the name of a single request header which caused the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions