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

Check Client-Generated IDs on creating resource #42

Open
Art4 opened this issue May 24, 2018 · 2 comments
Open

Check Client-Generated IDs on creating resource #42

Art4 opened this issue May 24, 2018 · 2 comments

Comments

@Art4
Copy link
Owner

Art4 commented May 24, 2018

As stated in the spec a client-generated ID along with a request to create a rescource MUST SHOULD be an UUID.

Source: http://jsonapi.org/format/1.0/#crud-creating-client-ids

Client-Generated IDs

A server MAY accept a client-generated ID along with a request to create a resource. An ID MUST be specified with an id key, the value of which MUST be a universally unique identifier. The client SHOULD use a properly generated and formatted UUID as described in RFC 4122 [RFC4122].

The default ID checker should check for UUIDs, but it should be possible to inject a custom checker.

@nebur81
Copy link

nebur81 commented Jun 6, 2019

Hi, in some cases it doesn't MUST be an UUID:

NOTE: In some use-cases, such as importing data from another source, it may be possible to use something other than a UUID that is still guaranteed to be globally unique. Do not use anything other than a UUID unless you are 100% confident that the strategy you are using indeed generates globally unique identifiers.

@Art4
Copy link
Owner Author

Art4 commented Jun 7, 2019

@nebur81 Thanks, I've updated the issue description.

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

No branches or pull requests

2 participants