-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add test cases regarding JSON schema $ref validation
Add a positive test case and two negative test cases (valid data with invalid schema ref and invalid data with valid schema ref)
- Loading branch information
Showing
3 changed files
with
88 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"definitions": { | ||
"bar": { | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object", | ||
"required": ["foo"], | ||
"additionalProperties": false, | ||
"properties": { | ||
"foo": { | ||
"$ref": "#/definitions/baz" | ||
} | ||
} | ||
} |
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,16 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"definitions": { | ||
"bar": { | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object", | ||
"required": ["foo"], | ||
"additionalProperties": false, | ||
"properties": { | ||
"foo": { | ||
"$ref": "#/definitions/bar" | ||
} | ||
} | ||
} |
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