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 swagger should rename the violated parameter name to keep them aligned with each other across different paths with parenting relationship
What't the impact if breaking the rule
This benefits the tools that validate parenting relationship between operations and resources, and will make the generated SDKs have aligned parameter names
The text was updated successfully, but these errors were encountered:
So do we have suggestion on which name should be treated as the source of truth
FWIW we're using the Resource itself (e.g. the VM) as the source of truth as other URIs are operations on this resource (e.g. /restart, or provisioning a nested resource under the parent resource) - so I'd suggest doing the same here such that given the URIs:
The URI /subscriptions/{subsId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{name} (and the segment name) should be the source of truth, and raise an error about these two operations:
Lint rule description
For instance we have a path:
and any sub-path whose parent is this path, should have exactly the same prefix as the above path, including the variable names.
this is acceptable, but this
is not acceptable.
Related swagger example
The changes in this PR Azure/azure-rest-api-specs#20588 is aligning such a parameter name between two paths.
Category
SDK
Severity level
Error
Applies to
Management plane API spec, Data plane API spec
How to fix the violation
The swagger should rename the violated parameter name to keep them aligned with each other across different paths with parenting relationship
What't the impact if breaking the rule
This benefits the tools that validate parenting relationship between operations and resources, and will make the generated SDKs have aligned parameter names
The text was updated successfully, but these errors were encountered: