This commit is contained in:
Sergey Shandar 2019-03-07 16:42:07 -08:00 коммит произвёл Vlad Barosan
Родитель 69ea6923c3
Коммит 052297ec6e
4 изменённых файлов: 10 добавлений и 6 удалений

2
.vscode/launch.json поставляемый
Просмотреть файл

@ -24,7 +24,7 @@
"cwd": "${workspaceRoot}",
"args": [
"validate-example",
"C:/github.com/Azure/azure-rest-api-specs/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2019-01-21/kusto.json",
"C:/github.com/Azure/azure-rest-api-specs/specification/cdn/resource-manager/Microsoft.Cdn/stable/2017-10-12/cdn.json",
"--pretty"
],
"env": {}

Просмотреть файл

@ -1,5 +1,9 @@
# Changelog
### 03/07/2019 0.14.3
- OAV shouldn't parse `error.title` twice.
### 03/06/2019 0.14.2
- Use one cache per SpecValidator inside the LiveValidator.

Просмотреть файл

@ -32,7 +32,7 @@ export const setPositionAndUrl = (
const addFileInfo = <T extends NodeError<T>>(error: T): T => {
const title = error.title
if (title !== undefined) {
if (error.position === undefined && title !== undefined) {
try {
const titleObject: TitleObject | undefined = JSON.parse(title)
setPositionAndUrl(error, titleObject)
@ -41,7 +41,7 @@ const addFileInfo = <T extends NodeError<T>>(error: T): T => {
}
}
const json = error[jsonSymbol]
if (json !== undefined) {
if (error.jsonPosition === undefined && json !== undefined) {
const jsonInfo = getInfo(json)
if (jsonInfo !== undefined) {
const errorPathOriginal = error.path

Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "oav",
"version": "0.14.2",
"version": "0.14.3",
"author": {
"name": "Microsoft Corporation",
"email": "azsdkteam@microsoft.com",
@ -9,7 +9,7 @@
"description": "Validate Azure REST API Specifications",
"license": "MIT",
"dependencies": {
"@azure/openapi-markdown": "^0.7.4",
"@azure/openapi-markdown": "^0.7.7",
"@microsoft.azure/autorest-extension-base": "1.0.13",
"@ts-common/commonmark-to-markdown": "^1.1.10",
"@ts-common/iterator": "^0.1.4",
@ -118,4 +118,4 @@
"engines": {
"node": ">=10.11.0"
}
}
}