-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate contains change #3209
Validate contains change #3209
Conversation
…e dependencies are not backwards compat. Need to bump HAPI version.
Codecov Report
@@ Coverage Diff @@
## master #3209 +/- ##
============================================
- Coverage 82.80% 82.78% -0.02%
- Complexity 20258 20273 +15
============================================
Files 1362 1365 +3
Lines 72799 72858 +59
Branches 10975 10978 +3
============================================
+ Hits 60281 60318 +37
- Misses 8306 8331 +25
+ Partials 4212 4209 -3
Continue to review full report at Codecov.
|
Alright so, these changes are related to bumping the dependency on org.hl7.fhir.core to version 5.3.0. The main updates that resulted in the majority of the changes in this PR were the addition of the interface IValidationPolicyAdvisor, and the refactoring of some of the main validation classes (for cleaning purposes). Also, many of the error messages were updated, so the resulting tests in HAPI had to be modified to reflect these message changes. In regard to the new interface IValidationPolicyAdvisor, by implementing this interface and passing it through the validation context in HAPI to the [InstanceValidator] (https://github.com/hapifhir/org.hl7.fhir.core/blob/master/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java) in the core libraries, users can now control the behavior of the validator when validating references, contained resources, and coded content. Previously, only references were controlled in this way, and users controlled this by overriding the validation fetcher. Test cases were added in the validation test cases repository to demonstrate it's functionality. In particular, the two test cases Please let me know if you have any questions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, just a couple minor questions for my own clarity, and some minor style stuff.
- This requires a changelog
- Does this change break Smile CDR? If so, bumping the HAPI version makes sense here, otherwise you can leave it at PRE3.
Otherwise, lgtm.
hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/FhirValidator.java
Outdated
Show resolved
Hide resolved
...jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3ValidateTest.java
Outdated
Show resolved
Hide resolved
...on/src/main/java/org/hl7/fhir/common/hapi/validation/validator/FhirDefaultPolicyAdvisor.java
Show resolved
Hide resolved
...on/src/main/java/org/hl7/fhir/common/hapi/validation/validator/VersionTypeAdvisorDstu21.java
Show resolved
Hide resolved
hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/FhirInstanceValidatorR4Test.java
Show resolved
Hide resolved
Chagelog added, and this will break things in CDR, so I bumped to PRE-4 |
|
||
Test cases were added in the validation test cases repository to demonstrate it's functionality. In particular, the two | ||
test cases contained-resource-bad-id, and contained-resource-bad-id-ignore. The definitions and expected outcomes of | ||
these test cases are in the manifest.json in that repository." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While i do appreciate the verbosity from a developer perspective, we try to keep public changelogs at a high level indicating what specific things might impact users without getting too deep into technical details.. In this case i would write something like (obviously adjust it for the actual changes you made):
An upgrade to the core libraries has added the ability to control whether contained resources get validated. You can read more about it [in the documentation](link to documentation here).
Give me a moment to review this myself first, then I will provide details and tag people.