We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed67b8d commit a982edcCopy full SHA for a982edc
src/Hl7.Fhir.Base/Specification/Source/InMemoryResourceResolver.cs
@@ -98,12 +98,9 @@ private void add(Resource resource)
98
///<inheritdoc/>
99
public Resource? ResolveByCanonicalUri(string uri)
100
{
101
- var values = uri.Split('|');
102
- if (values.Length > 2)
103
- throw new ArgumentException("Url is not valid. The pipe occurs more than once.");
104
-
105
- var canonicalUrl = values[0];
106
- var version = values.Length == 2 ? values[1] : string.Empty;
+ var canonical = new Canonical(uri);
+ var canonicalUrl = canonical.Uri;
+ var version = canonical.Version ?? string.Empty;
107
108
// Filter by canonical URL first
109
var candidateResources = _resources.Where(r => r.Url == canonicalUrl).ToList();
0 commit comments