Skip to content

Commit

Permalink
Merge branch 'main' into do-20240104-bump-core-6.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamegrieve authored Jan 8, 2025
2 parents 71c9d06 + e81d182 commit d89fa27
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 10 deletions.
7 changes: 7 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/test" path="src/test/java">
<attributes>
<attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>
Expand Down
4 changes: 4 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Security Policy

## Supported Versions

Only new releases of this project will contain security updates. All clients should use the latest version of this project in their dependencies. There is no process in place to backport security fixes to previous releases. If you require a backport, please [create an issue](../../issues/new/choose) containing an explanation of why the latest version cannot be used.

## Reporting a Vulnerability

Please report all potential security vulnerabilities using the [Report a vulnerability](../../security/advisories/new) button in the [Security](../../security) section of this repository.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fhirCoreVersion = 6.5.4
fhirCoreVersion = 6.5.5-SNAPSHOT
apachePoiVersion = 5.2.1
jacksonVersion = 2.16.0
apacheHttpcomponentsVersion = 4.5.13
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ public void checkContextValid(StructureDefinitionContextComponent ec, String con
throw new Error("The element context '"+ec.getExpression()+"' is not valid @ "+context);
} else if (ec.getType() == ExtensionContextType.FHIRPATH) {
FHIRPathEngine fpe = new FHIRPathEngine(worker);
TypeDetails td = fpe.check(null, null, null,null, ec.getExpression());
TypeDetails td = fpe.check(null, null, null, null, ec.getExpression());
if (td.hasNoTypes())
throw new Error("The resource context '"+ec.getExpression()+"' is not valid @ "+context);
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,9 @@ private Map<String, byte[]> loadZip(InputStream stream) throws IOException {

private FHIRVersion determineVersion(Map<String, byte[]> files) throws FHIRException {
byte[] b = files.get("version.info");
if (b == null)
return FHIRVersion.NULL;
if (b == null) {
throw new FHIRException("No version information available");
}
String s = new String(b);
s = Utilities.stripBOM(s).trim();
while (s.charAt(0) != '[')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.hl7.fhir.r5.conformance.profile.ProfileKnowledgeProvider;
import org.hl7.fhir.r5.conformance.profile.ProfileUtilities;
import org.hl7.fhir.r5.context.BaseWorkerContext;
import org.hl7.fhir.r5.context.BaseWorkerContext.IByteProvider;
import org.hl7.fhir.r5.context.CanonicalResourceManager;
import org.hl7.fhir.r5.context.ContextUtilities;
import org.hl7.fhir.r5.context.HTMLClientLogger;
Expand Down Expand Up @@ -111,6 +112,7 @@
*/
public class BuildWorkerContext extends BaseWorkerContext implements IWorkerContext, ProfileKnowledgeProvider {


private static final String SNOMED_EDITION = "900000000000207008"; // international
// private static final String SNOMED_EDITION = "731000124108"; // us edition

Expand Down Expand Up @@ -777,7 +779,7 @@ public int loadFromPackageInt(NpmPackage pi, IContextResourceLoader loader, List
}
}
for (String s : pi.list("other")) {
binaries.put(s, TextFile.streamToBytes(pi.load("other", s)));
binaries.put(s, new BytesFromPackageProvider(pi, s));
}
if (version == null) {
version = pi.version();
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/org/hl7/fhir/tools/publisher/ExampleInspector.java
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,16 @@ public ReferenceValidationPolicy getReferencePolicy() {
return ReferenceValidationPolicy.IGNORE;
}

@Override
public IValidationPolicyAdvisor getPolicyAdvisor() {
return null;
}

@Override
public IValidationPolicyAdvisor setPolicyAdvisor(IValidationPolicyAdvisor policyAdvisor) {
return null;
}


}

Expand Down
10 changes: 5 additions & 5 deletions src/main/java/org/hl7/fhir/tools/publisher/Publisher.java
Original file line number Diff line number Diff line change
Expand Up @@ -1015,9 +1015,9 @@ private boolean testSearchParameter(SearchParameter sp, StructureDefinition rd)
String exp = sp.getExpression().replace("{{name}}", rd.getType()); // for templates
TypeDetails td = null;
if (sp.getBase().size() > 1) {
td = fpe.check(null, rd.getType(), rd.getType(), page.getWorkerContext().getResourceNames(), fpe.parse(exp), set);
td = fpe.check(null, "Resource", rd.getType(), page.getWorkerContext().getResourceNames(), fpe.parse(exp), set);
} else {
td = fpe.check(null, rd.getType(), rd.getType(), rd.getType(), fpe.parse(exp), set);
td = fpe.check(null, "Resource", rd.getType(), rd.getType(), fpe.parse(exp), set);
}
if (!Utilities.existsInList(sp.getCode(), "_id", "_in") && sp.getType() != SearchParamType.COMPOSITE) {
String types = page.getDefinitions().getAllowedSearchTypes().get(sp.getType().toCode());
Expand Down Expand Up @@ -1189,9 +1189,9 @@ private boolean checkInvariant(FHIRPathEngine fpe, StructureDefinition sd,
try {
Set<ElementDefinition> set = new HashSet<>();
if (sd.getKind() == StructureDefinitionKind.RESOURCE) {
fpe.check(null, sd.getType(), sd.getType(), ed.getPath(), fpe.parse(inv.getExpression()), set);
fpe.check(null, "Resource", sd.getType(), ed.getPath(), fpe.parse(inv.getExpression()), set);
} else {
fpe.check(null, "Resource", "DomainResource", ed.getPath(), fpe.parse(inv.getExpression()), set);
fpe.check(null, "Resource", "Resource", ed.getPath(), fpe.parse(inv.getExpression()), set);
}
for (ElementDefinition edt : set) {
if (!edt.getPath().equals(ed.getPath()) && map.containsKey(edt.getPath())) {
Expand Down Expand Up @@ -1494,7 +1494,7 @@ private void checkExpression(StringBuilder b, FHIRPathEngine fp, FHIRPathUsage p
b.append(p.getResource() + " (" + p.getContext() + "): " + p.getExpression()+"\r\n");
try {
if (!"n/a".equals(p.getExpression())) {
fp.check(null, p.getResource(), p.getResource(), p.getContext(), p.getExpression());
fp.check(null, "Resource", p.getResource(), p.getContext(), p.getExpression());
}
} catch (Exception e) {
ValidationMessage validationMessage = new ValidationMessage(Source.Publisher, IssueType.STRUCTURE, -1, -1, p.getLocation(),
Expand Down

0 comments on commit d89fa27

Please sign in to comment.