-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added model validation and more refactoring
- Loading branch information
1 parent
e23cebe
commit 20c10be
Showing
6 changed files
with
60 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License in the project root for license information. | ||
|
||
'use strict'; | ||
var _ = require('lodash'), | ||
utils = require('./util/utils'), | ||
oav = require('openapi-validation-tools'); | ||
|
||
describe('Azure swagger model validation using x-ms-examples and examples in spec', function () { | ||
let swaggersToProcess = utils.getFilesChangedInPR(); | ||
_(swaggersToProcess).each(function (swagger) { | ||
it(swagger + ' should have valid examples.', function (done) { | ||
oav.validateExamples(swagger, null, false, 'error').catch(function (err) { | ||
console.log(err); | ||
}); | ||
done(); | ||
}); | ||
}).value(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters