Repository navigation
Conversation
Patterns were copied from the CUE source with strings.Trim, which kept the CUE string escapes. The Email, URL and SchemaVersion patterns in the generated OpenAPI therefore asked for a literal backslash, so valid values did not match. Unquote the literal with literal.Unquote instead. Fixes ossf#234 Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
cvas22
force-pushed
the
fix/234-unquote-patterns
branch
from
November 23, 2026 21:31
fd238b3 to
bfccf14
Compare
Author
|
Yep, that was an accident. Removed the exe, thx for catching it. |
jmeridth
reviewed
Nov 24, 2026
Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
This branch has not been deployed
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.
Fixes #234
The converter took patterns straight from the CUE source with
strings.Trim, so CUE escapes like\\.ended up inopenapi.yamland the Email, URL and SchemaVersion patterns stopped matching valid values. This adds a smallregexPatternhelper that usesliteral.Unquote(already used for string unions) and calls it in the seven places that read a pattern.The new test converts the real
specpackage and checks each pattern against good and bad values. It fails on main and passes with the change.