Azure / Azure/azure-openapi-validator
Indicate "before/after" in error JSON
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 57
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
Errors should include one or more ways to indicate whether they apply to the "before" or "after" spec. Example of current schema:
```json
{
"pluginName": "spectral",
"extensionName": "@microsoft.azure/openapi-validator",
"level": "error",
"message": "The integer type does not have a format, please add it.",
"code": "IntegerTypeMustHaveFormat",
"details": {
"jsonpath": ["definitions", "TasksState", "properties", "tasks", "properties", "completed" ],
"validationCategory": "ARMViolation",
"providerNamespace": false,
"resourceType": false,
"range": {"start": { "line": 2251, "column": 26 }, "end": { "line": 2253, "column": 14} } },
"source": [ {"document": "file:///mnt/vss/_work/1/lint-c93b354fd9c14905bb574a8834c4d69b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzetext.json",
"position": {"line": 2251, "column": 13}
}
]
}
```
Options:
* Add property `beforeOrAfter` with values `before` and `after`
* Change "before" path to include directory `/before/`, and "after" path to include directory `/after/`
Contributor guide
Assessment
This issue has not been assessed yet.