santhosh-tekuri/jsonschema

parsing of "examples"

Closed this issue · 1 comments

yvesf commented

examples: https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10.4

In the compiler.go extraction of this field is dependent of the use of the fields 'if'/'then'/'else'.

According to the standard there is no limitations to the use of this field. In consequence the examples should always be parsed if ExtractAnnotations is set to true.

it is a mistake. the extractAnnotations should be inside "if r.draft.version >= 7 " but outside "if/then/else"