-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(uuid): UUID regexes to support all-or-none '-' separator
This PR changes the UUID validation to support either UUIDs with the expected number of separators or no separator at all. Under the hood, UUID validation no longer relies on regular expressions (exported regexp patterns are marked as deprecated) but on github.com/google/uuid. This brings a significant performance improvement on validation (~ 15-20 times faster). Notice that some non-standard UUID schemes as well as UUID v6 and v7 now pass "IsUUID". * contributes go-swagger/go-swagger#2878 Signed-off-by: Frederic BIDON <[email protected]>
- Loading branch information
Showing
4 changed files
with
163 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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