Possibility to reference other parts of the document
Closed this issue · 3 comments
manuschillerdev commented
With ajv I can reference other parts of the JSON document via the $data
keyword.
Would that be possible with this library as well?
Or would it be possible to define it as a separate custom keyword, maybe?
thanks!
santhosh-tekuri commented
It is not possible to use $data in standard keywords as in ajv. But you can create custom keyword. Extension.Validate gets the part of instance that is getting validated.
manuschillerdev commented
so I'd use the current value (=string containing a JSONPath or JSONPointer or similar), resolve it against the instance and validate it that way myself, correct?
santhosh-tekuri commented
Yes. You are correct