LintDiff: False positives for XmsClientNameParameter
- Dominant language
- C#
- Stars
- 135
- Forks
- 260
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 143
Description
Very similar to #7886 for `XmsClientName`, but this is for `XmsClientNameParameter`. It is the same paths, except it is for `x-ms-client-name`.
The errors look like:
```
{"pluginName":"spectral","extensionName":"@microsoft.azure/openapi-validator","level":"warning","message":"Value of `x-ms-client-name` cannot be the same as Property/Model.","code":"XmsClientNameParameter"
```
```
- $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}"].put.parameters[5] # addon
```
Looks like it is complaining that `addon` is both the name and `x-ms-client-name`.
```
{
"name": "addon",
"in": "body",
"description": "Resource create parameters.",
"required": true,
"schema": {
"$ref": "#/definitions/Addon"
},
"x-ms-client-name": "addon"
}
```
The TypeSpec currently has this for compatibility with previous API version:
``` tsp
@@projectedName(Addons.createOrUpdate::parameters.resource, "json", "addon");
@@OpenAPI.extension(Addons.createOrUpdate::parameters.resource,
"x-ms-client-name",
"addon"
);
```
I'll see if I can remove the `x-ms-client-name`.
Contributor guide
Assessment
This issue has not been assessed yet.