hapifhir / org.hl7.fhir.validator-wrapper

CLI, Desktop GUI, and Standalone Server for the FHIR Validator
Apache License 2.0
29 stars 15 forks source link

Implement /convert endpoint for xml/json conversion #165

Open rkorytkowski opened 7 months ago

rkorytkowski commented 7 months ago

The endpoint should accept POST requests with content in xml or json format and call the convert feature of the validator to transform input to xml or json. It should accept headers:

For Output:

  1. Accept: application/json
  2. Accept: application/xml

For Input:

  1. Content-Type: application/json
  2. Content-Type: application/xml

The conversion endpoint could also be extended to support conversion from/to different FHIR versions with URL parameters fromVersion and toVersion.

I'd like to work on this feature once approved.

rkorytkowski commented 7 months ago

Draft PR at https://github.com/hapifhir/org.hl7.fhir.validator-wrapper/pull/167

lawley commented 6 months ago

https://www.hl7.org/fhir/resource-operation-convert.html provides a spec for this. It should also handle fhirVersion=... in the Accept & Content-Type headers