update to 0.3.0 spec

This commit is contained in:
sloane 2024-04-22 08:42:26 -04:00
parent 6232bf4c7f
commit bd0ce3a340
No known key found for this signature in database
2 changed files with 24 additions and 6 deletions

View file

@ -4,7 +4,7 @@
# Each example contains an invalid TypeID string. Implementations are expected
# to throw an error when attempting to parse/validate these strings.
#
# Last updated: 2023-07-05
# Last updated: 2024-04-10 (for version 0.3.0 of the spec)
- name: prefix-uppercase
typeid: "PREFIX_00000000000000000000000000"
@ -18,9 +18,10 @@
typeid: "pre.fix_00000000000000000000000000"
description: "The prefix can't have symbols, it needs to be alphabetic"
- name: prefix-underscore
typeid: "pre_fix_00000000000000000000000000"
description: "The prefix can't have symbols, it needs to be alphabetic"
# Test removed in v0.3.0 we now allow underscores in the prefix
# - name: prefix-underscore
# typeid: "pre_fix_00000000000000000000000000"
# description: "The prefix can't have symbols, it needs to be alphabetic"
- name: prefix-non-ascii
typeid: "préfix_00000000000000000000000000"
@ -85,4 +86,14 @@
- name: suffix-overflow
# This is the first suffix that overflows into 129 bits
typeid: "prefix_8zzzzzzzzzzzzzzzzzzzzzzzzz"
description: "The should encode at most 128-bits"
description: "The suffix should encode at most 128-bits"
# Tests below were added in v0.3.0 when we started allowing '_' within the
# type prefix.
- name: prefix-underscore-start
typeid: "_prefix_00000000000000000000000000"
description: "The prefix can't start with an underscore"
- name: prefix-underscore-end
typeid: "prefix__00000000000000000000000000"
description: "The prefix can't end with an underscore"

View file

@ -23,7 +23,7 @@
# note that not all of them are UUIDv7s. When *generating* new random typeids,
# implementations should always use UUIDv7s.
#
# Last updated: 2023-07-05
# Last updated: 2024-04-10 (for version 0.3.0 of the spec)
- name: nil
typeid: "00000000000000000000000000"
@ -64,3 +64,10 @@
typeid: "prefix_01h455vb4pex5vsknk084sn02q"
prefix: "prefix"
uuid: "01890a5d-ac96-774b-bcce-b302099a8057"
# Tests below were added in v0.3.0 when we started allowing '_' within the
# type prefix.
- name: prefix-underscore
typeid: "pre_fix_00000000000000000000000000"
prefix: "pre_fix"
uuid: "00000000-0000-0000-0000-000000000000"