Skip to content

Commit

Permalink
Merge pull request jdorn#717 from kameelyan/master
Browse files Browse the repository at this point in the history
Add allOf to existing validation ignore and add .vs into gitignore
  • Loading branch information
schmunk42 authored Apr 14, 2020
2 parents cfec910 + c8a8bac commit 65bcc92
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
.env
/src/themes/*.css.js
/src/editors/*.css.js
/.vs
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- Cleaned how default themes, iconlibs, editors and templates are imported to JSONEditor
- Added ability to attache editors and themes style rules to the shadowRoot if the editor is inside a Web Component.
- Fix of #701 - editors/number.js and editors/integer.js don't change values when validation is failed
- Fix of #716 - add ignore for allOf to fall in line with existing ignores of anyOf/oneOf for additionalProperties validation

### 2.0.0-dev
- Fix of #643 - Allow use of themes not compiled directly into the build
Expand Down
4 changes: 2 additions & 2 deletions src/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,8 @@ export class Validator {
}
})

/* The no_additional_properties option currently doesn't work with extended schemas that use oneOf or anyOf */
if (typeof schema.additionalProperties === 'undefined' && this.jsoneditor.options.no_additional_properties && !schema.oneOf && !schema.anyOf) {
/* The no_additional_properties option currently doesn't work with extended schemas that use oneOf or anyOf or allOf */
if (typeof schema.additionalProperties === 'undefined' && this.jsoneditor.options.no_additional_properties && !schema.oneOf && !schema.anyOf && !schema.allOf) {
schema.additionalProperties = false
}

Expand Down

0 comments on commit 65bcc92

Please sign in to comment.