Skip to content

Commit

Permalink
Support undefined schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
mokkabonna committed Oct 22, 2017
1 parent cc84550 commit 6d9bd31
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 16 deletions.
78 changes: 66 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,20 @@
"devDependencies": {
"chai": "^4.1.2",
"coveralls": "^3.0.0",
"eslint": "^4.8.0",
"eslint": "^4.9.0",
"eslint-config": "^0.3.0",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-standard": "^3.0.1",
"json-schema-merge-allof": "^0.5.5",
"json-schema-ref-parser": "^3.3.1",
"json-stringify-safe": "^5.0.1",
"mocha": "^4.0.1",
"nyc": "^11.2.1",
"require-uncached": "^1.0.3",
"vue": "^2.5.1",
"vue": "^2.5.2",
"vuelidate": "^0.6.1"
},
"dependencies": {
Expand Down
2 changes: 2 additions & 0 deletions src/property-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ function getPropertyValidationRules(propertySchema, isRequired, isAttached, prop
// support for boolean schemas
if (propertySchema === true) {
return validationObj
} else if (propertySchema === undefined) {
return validationObj
} else if (propertySchema === false) {
validationObj.schemaNotPresent = mostBeUndefined
return validationObj
Expand Down

0 comments on commit 6d9bd31

Please sign in to comment.