You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the method "getPatternToMatch" treat "pattern" as /^pattern$/ and "pattern." as /pattern./
for a regex, /pattern/ has different meaning from /^pattern$/, autorest.powershell should not make such assumption.
We should treat all input as regex.
The text was updated successfully, but these errors were encountered:
Let use https://github.com/Azure/autorest.powershell/blob/main/docs/directives.md#cmdlet-hiding-exportation-suppression for example. Current design:
Filters without special characters, e.g. verb: update, it will be implemented /^update$/ instead of /update/ for exactly word match.
Filters with special characters, e.g. subject: PetService.*, it will be implemented as /PetService.*/
Limitation of the design, if someone want to filter all the verb that contains update, he will need to use something like verb: update\d*
@VeryEarly's suggestion is in both cases, we just use regex. And for this solution, for an exact match, developers will need to change the directive from verb: update to verb: ^update$
Considering it is a breaking change and the impact is low, it is not worth to make change. Will need to update the docs to make the current design clear to all the users.
for where statement, following have ambiguous syntax
the method "getPatternToMatch" treat "pattern" as /^pattern$/ and "pattern." as /pattern./
for a regex, /pattern/ has different meaning from /^pattern$/, autorest.powershell should not make such assumption.
We should treat all input as regex.
The text was updated successfully, but these errors were encountered: