From 495673cd472f1e92da030bf6b709e080e4ddf6e8 Mon Sep 17 00:00:00 2001 From: Sergey Shandar Date: Wed, 28 Nov 2018 16:49:15 -0800 Subject: [PATCH] OAV 0.9.5 better error handling --- package.json | 9 ++++++--- scripts/semanticValidation.js | 7 ++++++- .../stable/2014-01-01/ADHybridHealthService.json | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 270c65eef6a1..3c3bc19ff9ec 100644 --- a/package.json +++ b/package.json @@ -13,16 +13,17 @@ "@microsoft.azure/async-io": "^1.0.21", "@microsoft.azure/literate": "^1.0.21", "@microsoft.azure/polyfill": "^1.0.17", + "@ts-common/local-install": "^0.0.7", "fs-extra": "^3.0.1", "glob": "^5.0.14", "js-yaml": "^3.8.2", "json-schema-ref-parser": "^3.1.2", "mocha": "*", "oad": "^0.1.11", - "oav": "^0.8.1", + "oav": "^0.9.5", "request": "^2.61.0", "request-promise-native": "^1.0.5", - "z-schema": "^3.16.1" + "z-schema": "^3.24.2" }, "dependencies": { "@octokit/rest": "^15.2.6" @@ -36,6 +37,8 @@ "url": "http://github.com/azure/azure-rest-api-specs/issues" }, "scripts": { - "test": "mocha -t 500000 --reporter min" + "test": "mocha -t 500000 --reporter min", + "oav": "oav", + "li": "local-install" } } diff --git a/scripts/semanticValidation.js b/scripts/semanticValidation.js index 6c5d8952bc30..afa72694ed62 100644 --- a/scripts/semanticValidation.js +++ b/scripts/semanticValidation.js @@ -13,7 +13,12 @@ async function main() { // return (item.match(/.*Microsoft.Logic.*2016-06-01.*/ig) !== null); // }); for (const swagger of swaggersToProcess) { - await oav.validateSpec(swagger, {consoleLogLevel: 'error', pretty: true}); + try { + await oav.validateSpec(swagger, {consoleLogLevel: 'error', pretty: true}); + } catch (e) { + console.error("error: ") + console.error(e) + } } } diff --git a/specification/adhybridhealthservice/resource-manager/Microsoft.ADHybridHealthService/stable/2014-01-01/ADHybridHealthService.json b/specification/adhybridhealthservice/resource-manager/Microsoft.ADHybridHealthService/stable/2014-01-01/ADHybridHealthService.json index 46e80b072a21..a0d27ff3854d 100644 --- a/specification/adhybridhealthservice/resource-manager/Microsoft.ADHybridHealthService/stable/2014-01-01/ADHybridHealthService.json +++ b/specification/adhybridhealthservice/resource-manager/Microsoft.ADHybridHealthService/stable/2014-01-01/ADHybridHealthService.json @@ -3,7 +3,7 @@ "info": { "version": "2014-01-01", "title": "ADHybridHealthService", - "description": "REST APIs for Azure Active Drectory Connect Health" + "description": "REST APIs for Azure Active Directory Connect Health" }, "host": "management.azure.com", "schemes": [ "https" ],