-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
According to http://tools.ietf.org/html/draft-zyp-json-schema-03#page-14 extends field could be or scheme (aka JSON object) or array of schemas (JSON array).
this example will illustrate error:
api.json:
{
"type" : "object",
"extends" : [
{"$ref" : "rq.json"},
{
"properties" : {
"id" : {
"type" : "integer",
"required" : true
}
}
}
]
}rq.json:
{
"abstract" : "true",
"type" : "object",
"properties" : {
"type" : {
"type" : "string",
"maxLength" : "10",
"minLength" : "2"
}
}
}Result:
$ jerg -s . -t -
escript: exception error: no match of right hand side value false
in function jerg:get_schema/2 (src/jerg.erl, line 158)
in call from jerg:collect_properties/2 (src/jerg.erl, line 334)
in call from jerg:output_properties/3 (src/jerg.erl, line 283)
in call from jerg:output_object_record/4 (src/jerg.erl, line 262)
in call from jerg:output_records/3 (src/jerg.erl, line 245)
in call from jerg:run/1 (src/jerg.erl, line 88)
in call from jerg:main/1 (src/jerg.erl, line 34)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels