Expose invariant IDs as an extension on IssueComponent#672
Open
andrzejskowronski wants to merge 2 commits into
Open
Expose invariant IDs as an extension on IssueComponent#672andrzejskowronski wants to merge 2 commits into
IssueComponent#672andrzejskowronski wants to merge 2 commits into
Conversation
…` generation - Introduced `IssueComponentConfigurator` property in `IssueAssertion` for enriching `IssueComponent` without tight coupling. - Updated methods to pass configuration callbacks for adding extensions. - Enhanced unit tests to verify invariant ID exposure on `OperationOutcome`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #615
This pull request introduces a consistent enhancement across the Firely FHIR Validator codebase by updating the way validation results are constructed. Specifically, it ensures that when an
IssueAssertionis converted into aResultReport, the originating assertion object is included as context. This change improves traceability and debugging of validation issues by allowing consumers to identify the exact assertion that led to each validation result, and to annotate the results with the information contained by the specific assertions.The most important changes are:
Enhancements to Assertion Context Propagation:
AsResultin various validators (e.g.,BindingValidator,CanonicalValidator,CardinalityValidator,ChildrenValidator,ExtensionContextValidator,FhirPathValidator,FhirStringValidator,FhirTxt1Validator,FhirTypeLabelValidator,FhirUriValidator,FixedValidator,InvariantValidator,ExtensionSchema) to pass the current assertion object (thisor relevant instance) as an additional argument, ensuring the assertion context is preserved in validation results.Core Assertion and ResultReport Infrastructure:
Assertionproperty to theIssueAssertionclass and updated its constructor to accept and store anIAssertioninstance, so that each assertion can be traced back from the result. [1] [2] [3]Validatemethod andAsResultoverloads inIssueAssertionto ensure the assertion context is always included in the resultingResultReport. [1] [2]Minor Refactoring and Consistency Improvements:
CONTEXT_INVARIANT_KEYinExtensionContextValidatorto avoid magic strings and improve maintainability. [1] [2] [3]usingstatements inIssueAssertion.cs.These changes collectively enhance the reliability and maintainability of the validation framework by providing better introspection into validation failures and their origins.