Skip to content

Commit

Permalink
Fix OAV error log (Azure#3421)
Browse files Browse the repository at this point in the history
* Fix OAV error log

* remove test/model.js
  • Loading branch information
sergey-shandar authored Jul 17, 2018
1 parent 0a45a30 commit d068d86
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ script:
fi
- >-
if [[ $MODE == 'model' ]]; then
npm test -- test/model.js
node scripts/modelValidation.js
fi
- >-
if [[ $MODE == 'BreakingChange' ]]; then
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"json-schema-ref-parser": "^3.1.2",
"mocha": "*",
"oad": "^0.1.11",
"oav": "^0.4.44",
"oav": "^0.4.57",
"request": "^2.61.0",
"request-promise-native": "^1.0.5",
"z-schema": "^3.16.1"
Expand Down
20 changes: 20 additions & 0 deletions scripts/modelValidation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License in the project root for license information.
'use strict';

const utils = require('../test/util/utils')
const oav = require('oav');

async function main() {
const swaggersToProcess = utils.getFilesChangedInPR();
// Useful when debugging a test for a particular swagger.
// Just update the regex. That will return an array of filtered items.
// swaggersToProcess = swaggersToProcess.filter(function(item) {
// return (item.match(/.*Microsoft.Logic.*2016-06-01.*/ig) !== null);
// });
for (const swagger of swaggersToProcess) {
await oav.validateExamples(swagger, null, {consoleLogLevel: 'error', pretty: true});
}
}

main()
29 changes: 0 additions & 29 deletions test/model.js

This file was deleted.

0 comments on commit d068d86

Please sign in to comment.