This repository has been archived by the owner on May 5, 2023. It is now read-only.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand the fix. With this change, a text like
{foo bar}
that used to be a match for the old pattern, will no longer be a match. Is that intentional, why?In all, this change can be summarized as so :
I don't understand this change, feel free to drop by and talk to me 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, not sure I understand it either. Is "-" the only special char we want to allow or do we allow others? if so, should we just have the expression accept "-" between words?
I'm not sure about the original regex either though, do we allow spaces in between words for the property inside {}?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@balajikris @veronicagg Yes those are valid questions. I am also not sure why the initial regex was allowing
white space
/tabs
between{}
.Secondly, after looking around I saw that technically swagger path templating & rfc6570 does not say that
-
orspace
is not allowed. Moreover, sway and it's regex matcher intentionally decided not to support-
.The question remains for us is, path /storage/{storage-account-name} seems to be valid in
keyvault/2016-10-01/swagger/keyvault.json
with parameter defined as "name": "storage-account-name". The swagger validation tool does not complain about semantic validation butLet me know your thoughts!!