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

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

Open
dynamiccast opened this issue Jul 6, 2016 · 1 comment

Comments

@dynamiccast
Copy link

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 ?

dynamiccast added a commit to dynamiccast/sails-json-api-blueprints that referenced this issue Jul 6, 2016
dynamiccast added a commit to dynamiccast/sails-json-api-blueprints that referenced this issue Jul 6, 2016
dynamiccast added a commit to dynamiccast/sails-json-api-blueprints that referenced this issue Jul 11, 2016
@elliotttf
Copy link
Owner

Yes! This is an issue that should be fixed in jsonapi though. You can probably just take that schema and apply it directly.

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

2 participants