Add typed UUID generators#7
Conversation
- change uuids() to return java.util.UUID values - add uuidStrings() alongside version configuration support - default UUID generation to version 4 and validate versions in [1, 8] - derive UUID.class via Generators.forType - move UUID coverage into dedicated generator tests
|
noticed jacoco failure in CI, took a quick look, the problem is in the not clearly defined API for anyVersion() behaviour (doing so client can tell hegel-core to generate uuid with any version) - currently it can be done via uuids().version(null) - looks a bit awkard while working on the fix, found hegeldev/hegel-core#140 (comment) |
|
Thanks Ivan! I made a few API changes, otherwise this looks great. |
I prefer the latter, as it results in a more principled API surface |
totally agree, but I anyway decided to be a bit more conservative during making the changes because I wasn't sure about the intuition behind generating uuids as strings in the lib |
Closes #6