Trying to use MarkLogic's xdmp:json-validate
to validate instances of FHIR-formatted resources against the published FHIR JSON Schema that I have loaded into my Schemas database. When there is an invalid element, my output in query console is always the same:
[1.0-ml] XDMP-JINVNODE: oneOf fn:doc("/documents/examples/ml_loaded_member_1.json")/object-node() "fhir.schema.json" {...}
where {...}
appears to be a complete dump of the huge schema.
How can I get a meaningful message indicating the exact schema validation error?
UPDATE: After a bit more research into general validation using json schema, I'm assuming this issue is related to the use of the "discriminator/propertyName" keyword in the FHIR schema. That keyword value ("resourceType") informs validators how to determine which definition ("Patient" in my example) to validate against. I suspect that is not well supported, so the error report lists all definitions in the schema to which the given node does not conform. (or something like that)