You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception in thread "main" org.hl7.fhir.exceptions.FHIRException: Unable to find definitions at URL 'https://hapi.fhir.org/baseR4/StructureDefinition/profile-example-task-input-no-slice-dmuylwyk': Bad Request
at org.hl7.fhir.validation.cli.utils.ProfileLoader.loadProfileFromUrl(ProfileLoader.java:32)
at org.hl7.fhir.validation.cli.utils.ProfileLoader.loadProfileSource(ProfileLoader.java:18)
at org.hl7.fhir.validation.ValidationEngine.loadProfile(ValidationEngine.java:553)
at org.hl7.fhir.validation.cli.tasks.ValidateTask.executeTask(ValidateTask.java:57)
at org.hl7.fhir.validation.ValidatorCli.readParamsAndExecuteTask(ValidatorCli.java:374)
at org.hl7.fhir.validation.ValidatorCli.readParamsAndExecuteTask(ValidatorCli.java:171)
at org.hl7.fhir.validation.ValidatorCli.main(ValidatorCli.java:206)
Caused by: java.io.IOException: Bad Request
at org.hl7.fhir.utilities.http.HTTPResult.checkThrowException(HTTPResult.java:50)
at org.hl7.fhir.validation.cli.utils.ProfileLoader.loadProfileFromUrl(ProfileLoader.java:29)
... 6 more
Caused by: org.hl7.fhir.utilities.http.HTTPResultException: Invalid HTTP response 400 from https://hapi.fhir.org/baseR4/StructureDefinition/profile-example-task-input-no-slice-dmuylwyk?nocache=1720813749780 (Bad Request) (Response in /var/folders/3g/bqtb98z97c398m9f_b2k3rbc0000gn/T/http-log/fhir-http-2.log)
at org.hl7.fhir.utilities.http.HTTPResult.checkThrowException(HTTPResult.java:49)
... 7 more
One reason for this is that a nocache param gets added to the URL when GETing:
Beyond that, this still won't resolve because by default an HTML file is returned. Attempting to hack past that by appending a \?_format\=json then makes the canonical URL incorrect indicated by -profile unmatchable.
In the documentation, it's clear that the expected path is to load a full IG first. However, this greatly slows simple reproduction, as then IG packaging must get involved instead of simply validating against a single canonical URL.
Can we put some effort into canonical URL resolution for the -profile param?
The text was updated successfully, but these errors were encountered:
The
-profile
param has some issues trying to resolve from a canonical URL when the profile hasn't been specified in a loaded IG.Try running the following with the attached file bp.json:
An exception will be thrown:
One reason for this is that a
nocache
param gets added to the URL when GETing:org.hl7.fhir.core/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/cli/utils/ProfileLoader.java
Line 28 in a09c712
Beyond that, this still won't resolve because by default an HTML file is returned. Attempting to hack past that by appending a
\?_format\=json
then makes the canonical URL incorrect indicated by-profile
unmatchable.In the documentation, it's clear that the expected path is to load a full IG first. However, this greatly slows simple reproduction, as then IG packaging must get involved instead of simply validating against a single canonical URL.
Can we put some effort into canonical URL resolution for the
-profile
param?The text was updated successfully, but these errors were encountered: