Hey,
I’m writing a package which is expected to speak the JSON dialect of FHIR - it’s a set of adapters that talk to an ORM on one end, and to a FHIR-compliant data store on the other. I wanted to ensure that structures emitted by this adapter are compliant with FHIR.
In the SVN repo, I’ve found files that appear to be used to validate a JSON document against the FHIR JSON schema - from what I can tell they use draft 4 from json-schema.org. Having loaded them up into a validator (to validate against the draft4 metaschema), I got a few messages indicating that their syntax is incorrect. Specifically, when I load the file fhir.schema.json in http://json-schema-validator.herokuapp.com/syntax.jsp, I get the following:
[ {
“level” : “error”,
“message” : ““true | false” is not a valid primitive type (valid values are: [array, boolean, integer, null, number, object, string])”,
“domain” : “syntax”,
“schema” : {
“loadingURI” : “#”,
“pointer” : “/definitions/ActivityDefinition/allOf/1/properties/experimental”
},
“keyword” : “type”,
“found” : “true | false”,
“valid” : [ “array”, “boolean”, “integer”, “null”, “number”, “object”, “string” ]
}, {
“level” : “error”,
“message” : ““true | false” is not a valid primitive type (valid values are: [array, boolean, integer, null, number, object, string])”,
“domain” : “syntax”,
“schema” : {
“loadingURI” : “#”,
“pointer” : “/definitions/AuditEvent.Agent/allOf/1/properties/requestor”
},
…]
This would indicate that that schema is probably not usable right out of the box. Is this a known problem? Are these files typed up by hand or generated from some even-higher-level schema document? I could probably fix these - how would I submit a patch to rectify this?