Add uuidEncoding keyword for UUID encoding format selection#19
Open
Add uuidEncoding keyword for UUID encoding format selection#19
Conversation
added 6 commits
November 29, 2025 16:34
This adds a new 'uuidEncoding' type annotation keyword for the 'uuid' type that allows specifying alternate UUID encoding formats: - rfc9562: Standard RFC 9562 UUID format (default) - base32hex: 26-character unpadded base32hex encoding (RFC 4648) - base64: Base64 encoding (RFC 4648) - base64url: Base64url encoding (RFC 4648) Fixes #14
These encodings are being considered for inclusion in RFC 9562.
All encoding examples now use the same UUID: 550e8400-e29b-41d4-a716-446655440000
- Added RFC references for rfc9562 and base32hex (RFC4648 Section 7) - Added alphabet specification for base64sort - Noted that base64sort and base52sort are under consideration for RFC 9562 revision - Clarified that rfc9562 uses hexadecimal format with dashes
Only include encodings explicitly defined in RFC 9562 and RFC 4648: - rfc9562: Standard hexadecimal format with dashes - base32hex: 26-character unpadded base32hex (RFC 4648 Section 7)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new uuidEncoding type annotation keyword for the uuid type that allows specifying alternate UUID encoding formats.
Changes
Updated the uuid type definition (Section 3.2.2.20) to reference the new uuidEncoding keyword for alternate encodings.
Added the uuidEncoding Keyword section with the following permitted values:
Background
As discussed in #14, this implements a type qualifier approach to select the UUID encoding format, allowing for compact representations like base32hex while maintaining backward compatibility with the standard RFC 9562 format as the default.
Fixes #14