mirror of
https://github.com/sloanelybutsurely/typeid-elixir.git
synced 2024-11-28 01:42:54 -05:00
add script to update spec, update spec files
This commit is contained in:
parent
5bf8b50e2d
commit
a9186592d6
3 changed files with 17 additions and 3 deletions
|
@ -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-06-29
|
||||
# Last updated: 2023-07-05
|
||||
|
||||
- name: prefix-uppercase
|
||||
typeid: "PREFIX_00000000000000000000000000"
|
||||
|
@ -31,7 +31,7 @@
|
|||
description: "The prefix can't have any spaces"
|
||||
|
||||
- name: prefix-64-chars
|
||||
# 123456789 123456789 123456789 123456789 123456789 123456789 1234
|
||||
# 123456789 123456789 123456789 123456789 123456789 123456789 1234
|
||||
typeid: "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl_00000000000000000000000000"
|
||||
description: "The prefix can't be 64 characters, it needs to be 63 characters or less"
|
||||
|
||||
|
@ -81,3 +81,8 @@
|
|||
# This example would be valid if we were using the crockford hyphenation rules
|
||||
typeid: "prefix_123456789-0123456789-0123456"
|
||||
description: "The suffix can't ignore hyphens as in the crockford encoding"
|
||||
|
||||
- name: suffix-overflow
|
||||
# This is the first suffix that overflows into 129 bits
|
||||
typeid: "prefix_8zzzzzzzzzzzzzzzzzzzzzzzzz"
|
||||
description: "The should encode at most 128-bits"
|
||||
|
|
|
@ -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-06-29
|
||||
# Last updated: 2023-07-05
|
||||
|
||||
- name: nil
|
||||
typeid: "00000000000000000000000000"
|
||||
|
@ -50,6 +50,11 @@
|
|||
prefix: ""
|
||||
uuid: "00000000-0000-0000-0000-000000000020"
|
||||
|
||||
- name: max-valid
|
||||
typeid: "7zzzzzzzzzzzzzzzzzzzzzzzzz"
|
||||
prefix: ""
|
||||
uuid: "ffffffff-ffff-ffff-ffff-ffffffffffff"
|
||||
|
||||
- name: valid-alphabet
|
||||
typeid: "prefix_0123456789abcdefghjkmnpqrs"
|
||||
prefix: "prefix"
|
||||
|
|
4
scripts/update_spec.sh
Executable file
4
scripts/update_spec.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env bash -ex
|
||||
|
||||
wget https://raw.githubusercontent.com/jetpack-io/typeid/main/spec/invalid.yml -O priv/spec/invalid.yml
|
||||
wget https://raw.githubusercontent.com/jetpack-io/typeid/main/spec/valid.yml -O priv/spec/valid.yml
|
Loading…
Reference in a new issue