Azure / Azure/azure-openapi-validator
[Linter][LocationMustHaveXmsMutability] Reports broken path
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 57
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
Currently, we have two messages for one error but with a different format in CI. Example: https://travis-ci.com/Azure/azure-rest-api-specs-pr/jobs/86104329#L693
One is
```json5
{
"type": "Warning",
"code": "LocationMustHaveXmsMutability",
"message": "Property 'location' must have '\"x-ms-mutability\":[\"read\", \"create\"]' extension defined. Resource Model: 'LocationServicesAccount'",
"id": "S4002",
"validationCategory": "SDKViolation",
"providerNamespace": null,
"resourceType": null,
"sources": [
"file:///home/travis/build/Azure/azure-rest-api-specs-pr/specification/locationservices/resource-manager/Microsoft.LocationServices/2017-01-01-preview/locationservices.json:469:2 ($.definitions)"
]
}
```
another is
```json5
{
"Channel": "warning",
"Text": "Could not find the exact path [\"definitions\",\"properties\",\"location\"] for {\"type\":\"Warning\",\"code\":\"LocationMustHaveXmsMutability\",\"message\":\"Property 'location' must have '\\\"x-ms-mutability\\\":[\\\"read\\\", \\\"create\\\"]' extension defined. Resource Model: 'LocationServicesAccount'\",\"id\":\"S4002\",\"validationCategory\":\"SDKViolation\",\"providerNamespace\":null,\"resourceType\":null}"
}
```
The second one tells us that broken path is being reported by this linter rule. Example: `[\"definitions\",\"properties\",\"location\"]`. There is something missing between `definitions` & `properties`
cc:
@veronicagg @dsgouda @olydis
https://github.com/Azure/autorest/pull/2590#issuecomment-329881024
Contributor guide
Assessment
This issue has not been assessed yet.