I used the https://github.com/labra/shexjava project to check if the error gives more information about the element in the JSONLD data which failed a particular validation. I changed the "name" element in the wot.jsonld to an integer and ran the following command.
The response from the validation is given below. Although it gives information about what the error is, we do not have information about the element/field in the JSONLD which actually failed the validation. I also noticed that the es.weso.schema.Result itself is valid in such cases and the ResultShapeMap status is coming out as "nonconformant". What will be the scenario in which Result.isValid function return false? We would like to have both the Result to be invalid and have more information about the elements which failed validation.
[
{
"node" : "<http://example.org/mySensor>",
"shape" : "<Thing>",
"status" : "nonconformant",
"appInfo" : "Shaclex",
"reason" : "Error: Attempt: node: <http://example.org/mySensor>, shape: <Thing>\n1234 does not have datatype xsd:string"
}
]
I used the https://github.com/labra/shexjava project to check if the error gives more information about the element in the JSONLD data which failed a particular validation. I changed the "name" element in the wot.jsonld to an integer and ran the following command.
java -jar target/shexjava.jar -d examples/wot.jsonld -df JSON-LD -s examples/wot.shex -m examples/wot.shapeMap
The response from the validation is given below. Although it gives information about what the error is, we do not have information about the element/field in the JSONLD which actually failed the validation. I also noticed that the es.weso.schema.Result itself is valid in such cases and the ResultShapeMap status is coming out as "nonconformant". What will be the scenario in which Result.isValid function return false? We would like to have both the Result to be invalid and have more information about the elements which failed validation.