Uploaded image for project: 'FHIR Specification Feedback'
  1. FHIR Specification Feedback
  2. FHIR-9029

Clarify the expected value of Content-type for various Accept & _format values

    XMLWordPrintableJSON

Details

    • Icon: Change Request Change Request
    • Resolution: Persuasive with Modification
    • Icon: Medium Medium
    • FHIR Core (FHIR)
    • DSTU2
    • Implementable Technology Specifications
    • REST (http)
    • Hide

      Implementation Note: If a client provides a generic mime type in the Accept header (application/xml, text/json, or application/json), the server SHOULD respond with the requested mime type, using the XML or JSON formats described in this specification as the best representation for the named mime type (though see the note on the Binary resource.

      Note: the correct mime type is now application/fhir+xml or +json

      Show
      Implementation Note: If a client provides a generic mime type in the Accept header (application/xml, text/json, or application/json), the server SHOULD respond with the requested mime type, using the XML or JSON formats described in this specification as the best representation for the named mime type (though see the note on the Binary resource. Note: the correct mime type is now application/fhir+xml or +json
    • Grahame Grieve/Bryb Rhodes: 3-0-0
    • Clarification
    • Non-compatible
    • R5

    Description

      Section 2.1.0.6 Content Types and encodings says that the the _format parameter should support the values xml, text/xml, application/xml (and their json equivalents) and _ interpret _ them as application/xml+fhir (application/json+fhir).

      There are two issues requiring clarification:

      1. it doesn't say that the Accept header should allow these values, only the _format parameter
      2. it doesn't explicitly say that the Content-type header in the response should be application/xml+fhir (application/json+fhir)

      I'm seeking clarification that:

      1. servers SHOULD also support text/xml, application/xml (and the json equivalents) and interpret them as application/xml+fhir (application/json+fhir), and
      2. the Content-type header MUST match the original Accept header / _format paramter value in the case that they are MIME types, but in the case that the _format parameter is xml (json), then the Content-type header MUST be application/xml+fhir (application/json+fhir)

      The reasoning behind this is that non-FHIR aware clients are more likely to do something useful when presented with application/xml or text/xml as a Content-type than if they are presented with application/fhir+xml

      OTOH, FHIR-aware clients should be able to send an appropriate Accept header or _format parameter if they need a FHIR-specific MIME type to be returned.

      Attachments

        Activity

          People

            GrahameGrieve Grahame Grieve
            mjlawley Michael Lawley
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: