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

Relax record id validation #655

Closed
leplatrem opened this issue May 27, 2016 · 2 comments
Closed

Relax record id validation #655

leplatrem opened this issue May 27, 2016 · 2 comments
Assignees

Comments

@leplatrem
Copy link
Contributor

leplatrem commented May 27, 2016

Do we really need to ensure that posted record ids match a uuid regex?

We can generate a uuid when a record without id is posted, and leave the usage of uuid in our official clients.
But is there any reason to use a different regex that collection and bucket names?

edit: The usecase is the Web sync extension chrome.storage.sync: since any key is accepted, it takes the md5 of the key to "generate" UUIDs. Instead we could let the client push any key as record id.

@Natim
Copy link
Member

Natim commented May 27, 2016

I agree with your analysis, the main reason why we did that is to let people create IDs on client side without having to worry about conflicts.

Also we have a strategy to generate a UUID from another string (using the md5 approach).

But I agree with you that we should let people use something else if need be.

@glasserc
Copy link
Contributor

Ultimately, you need the client to choose the ID, but I don't think it needs to always be a UUID. I would be 👍 on relaxing the requirement.

glasserc pushed a commit to glasserc/kinto that referenced this issue May 31, 2016
glasserc pushed a commit to glasserc/kinto that referenced this issue May 31, 2016
Fix example filename in core docs (fixes Kinto#655)
@leplatrem leplatrem self-assigned this Jun 1, 2016
leplatrem added a commit that referenced this issue Jun 2, 2016
Allow record ids to be any string instead of just UUIDs (fixes #655)
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

3 participants