FI-3565: Bump core validator to 6.5.0 #80
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Bumps the core validator library to 6.5.0, with one trivial and one nontrivial change to keep up with the core engine.
Trivial change: add a null to support a changing method signature.
Nontrivial change: Adds an explicit "policy advisor" to the engine that ensures it doesn't try to validate missing references beyond what is expected. The logic is derived from how it's done upstream in the ValidationService:
https://github.com/hapifhir/org.hl7.fhir.core/blob/e021fb31fd2303f5ad702c02b81a9c1c391697a8/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/cli/services/ValidationService.java#L610
Here we are essentially working with
disableDefaultResourceFetcher:true
so the logic is cloned from lines 616-618 and line 627, and slightly cleaned up. I don't know why there are 2 levels of PolicyAdvisor but that's how it works.Testing Guidance
The main reason we are bumping this is to fix a regression where references to resources not included in the validation request would always return a "not found" type error.
Sample resource:
Run this on https://inferno.healthit.gov/validator/:
Run this locally (eg, run with
./gradlew run
and POST that in the body tohttp://localhost:4567/validate
) and that error should not occur. Other errors such as missing required fields should still be present.