-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Lint rule description
Path parameter names in different API path should be consistent in one RP. If there is a API definition "/A/{name}", then its child API definitions should use the same path parameter name "{name}", like "/A/{name}/B", NOT "/A/{Aname}/B"
Related swagger example
-
Compute The below 2 API below are share the same context, but unfortunately they are using different virtual machine scale set name (e.g. {virtualMachineScaleSetName} v.s. {vmScaleSetName}. - https://github.com/Azure/azure-rest-api-specs/blob/2c6bb907c749885e933bdb4e1a40f71bd9a60c3a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/compute.json#L7587 - https://github.com/Azure/azure-rest-api-specs/blob/2c6bb907c749885e933bdb4e1a40f71bd9a60c3a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/compute.json#L7651 2. Web The below 2 API use different web site names (e.g. {siteName} v.s. {name}). They are defined 2 files, but belong to the same RP. - https://github.com/Azure/azure-rest-api-specs/blob/2c6bb907c749885e933bdb4e1a40f71bd9a60c3a/specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/Diagnostics.json#L327 - https://github.com/Azure/azure-rest-api-specs/blob/2c6bb907c749885e933bdb4e1a40f71bd9a60c3a/specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/WebApps.json#L97
Azure/azure-rest-api-specs#18660
Category
SDK
Severity level
Error
Applies to
Management plane API spec, Data plane API spec, RPaaS API spec
How to fix the violation
consider using the same parameter name in different API path
What't the impact if breaking the rule
will bring confusion and inconsistency