-
Notifications
You must be signed in to change notification settings - Fork 2
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
VONK-5093: Validation is using now IScopedNode as input #207
Conversation
…ble and IGroupValidatable.
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.
One more philosphical question, and a question about one of the Validate() overloads.
I searched for "ITypedElement" in the codebase for the validator, and I see it appear on several places
That last category is interesting, since the reason we still use ITypedElement is that the SDK has function like |
# Conflicts: # src/Firely.Fhir.Validation/Impl/PatternValidator.cs # src/Firely.Fhir.Validation/Impl/ResourceSchema.cs # test/Firely.Fhir.Validation.Compilation.Tests.Shared/FhirTestCases # test/Firely.Fhir.Validation.Tests/Impl/ResourceSchemaTests.cs
In fact, the most interesting place is this one, in ValidationContext.cs
This, of course, should also be an
in |
Also, this, in the PathSelectorValidator would not work once we've moved FhirPath off ITypedElement:
|
I was curious how we are keeping track of the location when we do an internal jump, but I guess this is the clue:
So - basically this means that if we are jumping to an internal node, we still use the facilities of ScopedNode to track the Location (and the Parent)? Does this mean that in the end we wrap every IScopedNode inside a ScopedNode? |
In AssertionValidators.cs, the overloads taking |
I agree. |
I think we can remove Hl7.Fhir.Validation.Shared, it's the wrapper around the old validator! (yes, I tried it, we can!) |
The reason the tests still use the overloads taking |
…nish-public-surface # Conflicts: # src/Firely.Fhir.Validation/Impl/BindingValidator.cs # src/Firely.Fhir.Validation/Impl/ExtensionSchema.cs # src/Firely.Fhir.Validation/Impl/ResourceSchema.cs # src/Firely.Fhir.Validation/Schema/ValidationContext.cs # src/Hl7.Fhir.Validation.R4/Hl7.Fhir.Validation.R4.csproj # src/Hl7.Fhir.Validation.Shared/ValidationSettings.cs # test/Firely.Fhir.Validation.Tests/Impl/BindingValidatorTests.cs # test/Firely.Fhir.Validation.Tests/Impl/ResourceSchemaTests.cs
…r-r5 Makes the snapgen tests work for the R5 ElementSchema compiler.
…do with Evidence anymore.
- Implemented Base -> IScopedNode
…nish-public-surface
…ce' into feature/5091-finish-public-surface
…ds to the PublicAPI
…rface Finish the public surface for the validator
Description
Instead of using
ITypedElement
as input for the validation, we use nowIScopedNode
. The validator requires more than is available inITypedElement
, which are (some of) the features provided by ScopedNode. These requirements are not expressed structurally in the method signatures of, say, Validate(), instead the engines sniff their implementation ofITypedElement
to see whether the underlying implementation is a ScopedNode.In this pull request, we now explicitly mandate the inclusion of all members through the newly introduced interface
IScopedNode
.Remarks