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

Suggestion: Give user ability to set UUIDs #903

Closed
10 tasks done
etiennedi opened this issue Jul 1, 2019 · 3 comments · Fixed by #914
Closed
10 tasks done

Suggestion: Give user ability to set UUIDs #903

etiennedi opened this issue Jul 1, 2019 · 3 comments · Fixed by #914

Comments

@etiennedi
Copy link
Member

etiennedi commented Jul 1, 2019

Todos

  • non-batch
    • add missing unit tests for AddThing/AddAction UC to be able to safely make changes
    • if user sets valid uuid, don't assign new one
    • if user sets no uuid, assign automatically
    • if user sets invalid uuid, error
    • if user sets existing uuid, error
  • batch
    • add missing unit tests for AddThingBatch/AddActionBatch UC to be able to safely make changes
    • if user sets valid uuid, don't assign new one
    • if user sets no uuid, assign automatically
    • if user sets invalid uuid, error
    • document that no alreadyexists validation is happening on batch

Proposal

Currently importing things that depend on one another (i.e. cross-references) is hard, because we need to:

  1. Import ThingA
  2. Catch the ID of ThingA
  3. Modify the payload of ThingB to include a beacon with a reference to Thing A
  4. Import ThingB

If we allowed the user to set the UUID on Thing A, they could just assign UUIDs as they please and then import ThingA and ThingB without having to either catch an ID or modify a payload.

@bobvanluijt Thoughts?

@bobvanluijt
Copy link
Member

Yes! This would be fantastic. I would allow all UUID versions (if possible) except for Nil UUID types.

@bobvanluijt
Copy link
Member

I would like to move this up if possible, it comes in handy for some use cases.

@etiennedi
Copy link
Member Author

Sure, what do you offer in return? 😛

Kidding. In all seriousness, sure. I don't think I'll get to it today, but I can still prfioritize this highly.

etiennedi added a commit that referenced this issue Jul 8, 2019
so far only in POST /things and POST /actions, not in batch UCs, yet.
etiennedi added a commit that referenced this issue Jul 9, 2019
Warning: There are currently no duplicate checks
etiennedi added a commit that referenced this issue Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants