Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
default RAMLVersion to RAML08 to prevent a backward compatibility iss…
Browse files Browse the repository at this point in the history
…ue with Osprey 0.3.2. version++
  • Loading branch information
jstoiko committed Mar 8, 2017
1 parent 4f2a1e1 commit b9ce7cf
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ You must require the module and call it as a function to get a validation instan
```javascript
var validate = require('raml-validate')();

// RAML version to use, either 'RAML10' (default) or 'RAML08'
// RAML version to use, either 'RAML10' or 'RAML08' (default)
var RAMLVersion = 'RAML10'

// Create a user model schema.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "raml-validate",
"version": "1.1.0",
"version": "1.1.1",
"description": "Strict validation of RAML parameters",
"main": "raml-validate.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions raml-validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,8 @@ module.exports = function () {
}
}

// RAML version. Default to RAML 1.0.
RAMLVersion = RAMLVersion || 'RAML10'
// RAML version. Defaults to RAML 0.8.
RAMLVersion = RAMLVersion || 'RAML08'

var validations = {}
var validateRule = RAMLVersion === 'RAML10' ? validate.ruleRAML10 : validate.rule
Expand Down
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1409,7 +1409,7 @@ describe('raml-validate', function () {
].join(' ')

it(description, function () {
var validity = validate(params)(object)
var validity = validate(params, 'RAML10')(object)

expect(validity.valid).to.equal(valid)
// skipping error check until https://github.com/raml-org/typesystem-ts/issues/80
Expand Down

0 comments on commit b9ce7cf

Please sign in to comment.