FHIR specify set of Resources with dataelements with specific datatype as informational model - StructureDefinition resource. So we have to convert StructureDefinition into JSON schema.
Also FHIR has specification of REST API by convention - http://hl7.org/fhir/http.html, and ability to extend API by custom Operations - http://hl7.org/fhir/operationslist.html
So we could generate swagger document from http://hl7.org/fhir/capabilitystatement.html and list of operations.
FHIR has set of primitive and complex types - http://hl7.org/fhir/datatypes.html
FHIR has the notion of union types (choice).
Current representation in JSON is postfix notation:
You can see it here - https://github.com/niquola/json-schema.clj/blob/master/test/json_schema/custom_extensions_test.clj
The most important is deferred - https://github.com/niquola/json-schema.clj/blob/master/test/json_schema/custom_extensions_test.clj#L83