Skip to content

Commit

Permalink
Merge pull request #100 from FirelyTeam/feature/add-tooling-package-t…
Browse files Browse the repository at this point in the history
…o-package-resolver

Add tooling package to core package source
  • Loading branch information
mmsmits authored Feb 20, 2024
2 parents 8992913 + a1487f9 commit df24480
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions Firely.Fhir.Packages.Tests/FhirPackageSourceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ public async Task TestFhirCorePackages(FhirRelease release, string version, stri
var extension = await packageSource!.ResolveByCanonicalUriAsyncAsString("http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName");
extension.Should().NotBeNull();
extension.Should().Contain("\"url\":\"http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName\"");

if (release == FhirRelease.R5)
{
var toolingextension = await packageSource!.ResolveByCanonicalUriAsyncAsString("http://hl7.org/fhir/tools/StructureDefinition/elementdefinition-date-format");
toolingextension.Should().NotBeNull();
toolingextension.Should().Contain("\"url\":\"http://hl7.org/fhir/tools/StructureDefinition/elementdefinition-date-format\"");
}
}
}
}
2 changes: 1 addition & 1 deletion Firely.Fhir.Packages.Tests/TestHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static IEnumerable<PackageDependency> createDependencies(string[] dependencies)
yield return new PackageDependency(dep, "latest");
else
{
var versionDep = "=" + splitDependency[1];
var versionDep = splitDependency[1];
yield return new PackageDependency(splitDependency[0], versionDep);
}
}
Expand Down
4 changes: 2 additions & 2 deletions Firely.Fhir.Packages/Source/FhirPackageSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public FhirPackageSource(ModelInspector provider, string packageServer, string[]
FhirRelease.STU3 => new FhirPackageSource(provider, packageServer, new string[] { "[email protected]", "[email protected]" }),
FhirRelease.R4 => new FhirPackageSource(provider, packageServer, new string[] { "[email protected]", "[email protected]", "[email protected]" }),
FhirRelease.R4B => new FhirPackageSource(provider, packageServer, new string[] { "[email protected]", "[email protected]", "[email protected]" }),
FhirRelease.R5 => new FhirPackageSource(provider, packageServer, new string[] { "[email protected]", "[email protected]", "[email protected]" }),
FhirRelease.R5 => new FhirPackageSource(provider, packageServer, new string[] { "[email protected]", "[email protected]", "[email protected]", "hl7.fhir.uv.tools@<=1.0.0" }),
_ => null,
};
}
Expand Down Expand Up @@ -95,7 +95,7 @@ static IEnumerable<PackageDependency> createDependencies(string[] dependencies)
yield return new PackageDependency(dep, "latest");
else
{
var versionDep = "=" + splitDependency[1];
var versionDep = splitDependency[1];
yield return new PackageDependency(splitDependency[0], versionDep);
}
}
Expand Down

0 comments on commit df24480

Please sign in to comment.