Skip to content

Id member not required when resource object represents a new resource to be created on the server #29

@dynamiccast

Description

@dynamiccast

Hi,

jsonapi-validator requires resources to have an id https://github.com/elliotttf/jsonapi-validator/blob/master/lib/schema.json#L122

However, there is an exception to this rule in the JSON API specification (http://jsonapi.org/format/#document-resource-objects).

Exception: The id member is not required when the resource object originates at the client and represents a new resource to be created on the server.

Should jsonapi-validator be updated to take this case into account ?

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