Stream: implementers
Topic: Parsing of canonical reference urls
Henk-Jan Meijer (Jul 24 2019 at 13:55):
The R4 specification gives this example of a canonical URI with fragment:
<valueSet value="http://fhir.acme.com/Questionnaire/example|1.0#vs1"/>
Apparently the version segment (|1.0
) should go before the fragment part (#vs1
). But what if the version would contain a #
character? E.g. if I'd like to version my questionnaire 2019#1
, 2019#2
, etc. (a bit of a stretch, but not unthinkable). The url would look like this (without fragment):
http://fhir.acme.com/Questionnaire/example|2019#1
How can I parse/interpret those kind of urls unambiguously? I can think of multiple solutions:
- disallow usage of
#
in versions - require version segment to be percent-encoded
- ...
But I could not find any documentation on how to handle this in the specs. Did I miss something?
Lloyd McKenzie (Jul 24 2019 at 17:37):
Given that version strings are part of the FHIR API, I guess we need to be stricter around what characters are allowed and define a regex similar to what we've done for Resource.id. Can you submit a change request? We'd need to constrain out (or set an expectation to escape) any #, / and similar characters appearing in the version string.
Henk-Jan Meijer (Jul 29 2019 at 07:49):
I cannot (yet) submit a change request (account awaiting approval). Happy to do it as soon as I'm allowed.
Lloyd McKenzie (Jul 29 2019 at 14:12):
@Henk-Jan Meijer - check your spam folder. The approval email should have been sent, but you'll need to click the 'activate' link.
Henk-Jan Meijer (Jul 29 2019 at 14:50):
@Lloyd McKenzie thanks, I got the link eventually. Created change request here: https://gforge.hl7.org/gf/project/fhir/tracker/?action=TrackerItemEdit&tracker_item_id=23011
Lloyd McKenzie (Jul 29 2019 at 14:56):
thanks
Last updated: Apr 12 2022 at 19:14 UTC