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
In this example, there is a KeyName = "hostName", which shows up in the operation parameters. The original swagger has pattern "^[-\w\._]+$" for this parameter.
I know there is a way to add patterns like this
But this applies pattern to all the resource operations. There is only a small portion of operations have this pattern.
Is there a way to add this pattern at a specified location?
The text was updated successfully, but these errors were encountered:
You can either use the Pattern parameter in the ResourceName template, or an augment decorator for @@pattern, like this
It doesn't seem to make sense for some resource operations to have a pattern constraint on a resource name and others not to - either the resource has an allowed pattern for names or it doesn't. If there are old specs that have the pattern constraint on some operations for a resource but not others, that is likely a swagger mistake that we do not want to replicate. Since Azure clients do not implement pattern constraints in code, correcting a previous oversight in swagger would have no generated code impact and would improve the accuracy of the spec.
In this example, there is a KeyName = "hostName", which shows up in the operation parameters. The original swagger has pattern "^[-\w\._]+$" for this parameter.
I know there is a way to add patterns like this
But this applies pattern to all the resource operations. There is only a small portion of operations have this pattern.
Is there a way to add this pattern at a specified location?
The text was updated successfully, but these errors were encountered: