I generate the JSON schemas for FHIR, which is a RESTful API for health data exchange.
I generate 2 sets of schemas - a single schema with everything in it. That schema is quite large (1.5Mb) so I also generate a series of modular schemas as well. They all refer to each other :-( - it's the way containment works. I've tried to understand the way that $ref works, but evidently I don't. I've had this exchange:
and now I have this:
It seems that all the problems are around the schema, and the interplay between the logical URI and the literal URL. Take the schema for the Patient resource - the URI for the Patient JSON schema is
http://hl7.org/fhir/json-schema/Patient, though the actual file lives at
http://hl7.org/fhir/Patient.schema.json. I haven't set up a redirect from logical to literal yet - though I maybe might be able to (logistical nightmare because I don't control the choice of server and can't run active content). But it's far from clear to me that would resolve the problems that are being reported around how the schema are constructed.
When I build the schemas - custom software I wrote, then I validate the json examples against the schema using the java everit library, which has no problems with the schema, though it might be a while since I tested invalid content. :-(
I'm hoping some one here will feel some pity for me, and help me get the schemas right
thanks
Grahame