-
In my continuing quest to dominate the smithy discussion boards...
Gets me this;
I guess I was hoping that UUID was somehow built in. Is the canonical strategy here to have a string, validate on receipt and return a "NotUuuid" error if the string doesn't comply? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Well you're in luck, because we make use of UUID types heavily internally so we decided to add first class support for it.
the
|
Beta Was this translation helpful? Give feedback.
-
I'm not sure there is such a thing as the "canonical strategy". Maybe it's a case that AWS uses another format that UUID and didn't deem there was a justification for UUID to become a bonafide shape 🤷 . Maybe it's a case that validating whether something is a UUID is not that important for most applications, and that the value of UUIDs derives from their random generation as opposed to the format. Without a custom |
Beta Was this translation helpful? Give feedback.
Well you're in luck, because we make use of UUID types heavily internally so we decided to add first class support for it.
the
name
field gets rendered as ajava.util.UUID
. If you want newtype UUIDs, you can do :