Is your feature request related to a problem? Please describe.
Conformance.md reads:
The IBM FHIR Server supports only version 4.0.1 of the specification and presently has no support for the MIME-type parameter fhirVersion.
Currently, we just drop the parameter from all requests. However, a better behavior would be to reject requests that include the fhirVersion parameter with the wrong fhirVersion.
Describe the solution you'd like
Since the server only supports version 4.0.1, it should reject requests for other fhirVersion values other than 4.0.1 and 4.0.
406 Not Acceptable is the appropriate response when the Accept header requests a format that the server does not support, and 415 Unsupported Media Type when the client posts a format that is not supported to the server.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
A description of the parameter and its meaning: https://www.hl7.org/fhir/versioning.html#mt-version
I would be great if we can get JAX-RS to handle this for us, but given that we'd also like to support application/fhir+json and application/fhir+json with no parameter, it might not be possible.
We should use this flavor of the MediaType constructor:
https://javaee.github.io/javaee-spec/javadocs/javax/ws/rs/core/MediaType.html#MediaType-java.lang.String-java.lang.String-java.util.Map-
QA Notes
Call an IBM FHIR Server API, passing the following HTTP header values:
- Accept: application/fhir+json; fhirVersion=4.0 [Valid]
- Content-Type: application/fhir+json; fhirVersion=4.0 [Valid]
- Accept: application/fhir+json; fhirVersion=3.0 [406 Not Acceptable]
- Content-Type: application/fhir+json; fhirVersion=3.0 [415 Unsupported Media Type]
Is your feature request related to a problem? Please describe.
Conformance.md reads:
Currently, we just drop the parameter from all requests. However, a better behavior would be to reject requests that include the fhirVersion parameter with the wrong fhirVersion.
Describe the solution you'd like
Since the server only supports version 4.0.1, it should reject requests for other fhirVersion values other than
4.0.1and4.0.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
A description of the parameter and its meaning: https://www.hl7.org/fhir/versioning.html#mt-version
I would be great if we can get JAX-RS to handle this for us, but given that we'd also like to support
application/fhir+jsonandapplication/fhir+jsonwith no parameter, it might not be possible.We should use this flavor of the MediaType constructor:
https://javaee.github.io/javaee-spec/javadocs/javax/ws/rs/core/MediaType.html#MediaType-java.lang.String-java.lang.String-java.util.Map-
QA Notes
Call an IBM FHIR Server API, passing the following HTTP header values: