-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
$ref should ignore any other properties re #47
- Loading branch information
1 parent
4160f98
commit 8173196
Showing
2 changed files
with
4 additions
and
6 deletions.
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 |
---|---|---|
|
@@ -61,6 +61,8 @@ | |
, JsonSchema :: jesse:json_term() | ||
, State :: jesse_state:state() | ||
) -> jesse_state:state() | no_return(). | ||
check_value(Value, [{?REF, RefSchemaURI} | _Attrs], State) -> | ||
validate_ref(Value, RefSchemaURI, State); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
andreineculau
via email
Author
Member
|
||
check_value(Value, [{?TYPE, Type} | Attrs], State) -> | ||
NewState = check_type(Value, Type, State), | ||
check_value(Value, Attrs, NewState); | ||
|
@@ -210,9 +212,6 @@ check_value(Value, [{?DISALLOW, Disallow} | Attrs], State) -> | |
check_value(Value, [{?EXTENDS, Extends} | Attrs], State) -> | ||
NewState = check_extends(Value, Extends, State), | ||
check_value(Value, Attrs, NewState); | ||
check_value(Value, [{?REF, RefSchemaURI} | Attrs], State) -> | ||
NewState = validate_ref(Value, RefSchemaURI, State), | ||
check_value(Value, Attrs, NewState); | ||
check_value(Value, [], State) -> | ||
maybe_external_check_value(Value, State); | ||
check_value(Value, [_Attr | Attrs], State) -> | ||
|
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
Looks like this is not a complete solution, because schema may look like
And in this case all checks will be performed, because
$ref
is the last one in a list.