forked from for-GET/jesse
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from thalesmg/fix-draft3-extends
fix: convert `extends` to proplist before checking
- Loading branch information
Showing
3 changed files
with
57 additions
and
1 deletion.
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
33 changes: 33 additions & 0 deletions
33
test/jesse_tests_draft3_SUITE_data/extra/extendsExtra.json
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,33 @@ | ||
[ | ||
{ | ||
"description": "simple example using `extends` with `disallow` in the base schema", | ||
"schema": { | ||
"type": "object", | ||
"extends": { | ||
"properties": { | ||
"disallow": { | ||
"disallow": ["number"], | ||
"required": true | ||
} | ||
} | ||
} | ||
}, | ||
"tests": [ | ||
{ | ||
"description": "valid value: string", | ||
"data": {"disallow": "a"}, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "valid value: array", | ||
"data": {"disallow": ["a", 1]}, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "invalid value: number", | ||
"data": {"disallow": 1}, | ||
"valid": false | ||
} | ||
] | ||
} | ||
] |