We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uritemplates.Parse() gives error if the path has hyphen in one of the path-param name.
Example : template, parseErr := uritemplates.Parse("https://api.github.com/repos/{repo-name}")
Gives error : not a valid name: repo-name
I am not able to comprehend why shouldn't this be allowed ? the regex used for validation is -----> "^([A-Za-z0-9_\.]|%[0-9A-Fa-f][0-9A-Fa-f])+$"
The text was updated successfully, but these errors were encountered:
I’m sorry I didn’t notice this earlier! The dash is not a valid character in variable names: https://tools.ietf.org/html/rfc6570#section-2.3
You can percent-encode it as %2D instead:
https://api.github.com/repos/{repo%2Dname}
Sorry, something went wrong.
No branches or pull requests
uritemplates.Parse() gives error if the path has hyphen in one of the path-param name.
Example :
template, parseErr := uritemplates.Parse("https://api.github.com/repos/{repo-name}")
Gives error :
not a valid name: repo-name
I am not able to comprehend why shouldn't this be allowed ?
the regex used for validation is -----> "^([A-Za-z0-9_\.]|%[0-9A-Fa-f][0-9A-Fa-f])+$"
The text was updated successfully, but these errors were encountered: