-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
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
Unsupported chars in placeholder name #2207
Comments
I will write you in Slack. |
Yes it's a sad thing because we have foreseen a lot of tests. The hyphen can't be used as regex group name caracter. |
Please make a decision: Would you prefer to categorize this issue as a bug or convert it to a feature? In my opinion, we do not have a bug. However, we face due to the lack of instructions in the Placeholders documentation, where we must clarify to users which characters can be used in placeholder names. Currently, we support only alphanumeric characters along with the underscore character, |
@raman-m I will have a more in-depth analysis of the situation. I think, we should first wait for more feedbacks. In my case, we have decided to use camelCasing instead. |
Good, clever boys! In addition to camel case names, we can throw in digits and
This issue should be opened, correct? |
Yes and Yes |
By the way, standard behavior for routing in .NET -> word with hyphens, camelCase, eg. user-id -> userId. So maybe we should follow this logic, but it's not a bug, it's a feature. |
Expected Behavior / New Feature
if "-" (hyphens) between the placeholders it should match
Actual Behavior / Motivation for New Feature
After having introduced the new solution the matching doesn't work when hyphens are found in the placeholders, eg: {"url-service-1"}
In fact, it's not possible to have hyphens as part of the regex group name, only alphanumerics and '_' (underscore) are allowed.
The text was updated successfully, but these errors were encountered: