Canonical URL
raheelsayeed opened this issue · 3 comments
A URI that refers to a resource by its canonical URL (resources with a url property). The canonical type differs from a uri in that it has special meaning in this specification, and in that it may have a version appended, separated by a vertical bar (|). Note that the type canonical is not used for the actual canonical URLs that are the target of these references, but for the URIs that refer to them, and may have the version suffix in them. Like other URIs, elements of type canonical may also have #fragment references
The canonical URIs in R4 aren't being handled in FHIRURL. Swift's URL does not accept a vertical bar.
Hence, a uri like http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire|3.5.0
fails.
Possibly two approaches we can take
- Add a
let version: String?
toFHIRURL
, catch the vertical bars on initialization, reassign toversion
- Entirely new class? This is perhaps unnecessary.
Any suggestions?
Perfect! Thanks Dave.
Unfortunately, I won't be at WWDC this year, but will be in DevDays. I'll test this out this week and comment back.