fixed context validation for issue #402 among other examples#510
Merged
andrzejskowronski merged 19 commits intodevelop-sdk6from Jul 2, 2025
Merged
fixed context validation for issue #402 among other examples#510andrzejskowronski merged 19 commits intodevelop-sdk6from
andrzejskowronski merged 19 commits intodevelop-sdk6from
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR addresses issue #402 by fixing context validation for extensions and refactoring the associated test and validation logic. Key changes include:
- Updating test cases and schema resolvers in ExtensionContextValidatorTests.cs to cover both boolean and HumanName contexts.
- Refactoring the context validation logic in ExtensionContextValidator.cs, including a revised implementation of validateElementContext.
- Removing the legacy MatchesContext method from DefinitionPath.cs as part of the overall refactoring effort.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/Firely.Fhir.Validation.Tests/Impl/ExtensionContextValidatorTests.cs | Updated tests and schema resolvers for improved and more precise context validation. |
| src/Firely.Fhir.Validation/Impl/ExtensionContextValidator.cs | Refactored validateElementContext logic with updated regex matching and parameter usage. |
| src/Firely.Fhir.Validation/Schema/DefinitionPath.cs | Removed the outdated MatchesContext method to simplify context matching logic. |
Comments suppressed due to low confidence (1)
src/Firely.Fhir.Validation/Impl/ExtensionContextValidator.cs:114
- [nitpick] Consider renaming the parameter 'instance' to 'node' to clarify that it represents the current node in the context tree.
private static bool validateElementContext(string contextExpression, PocoNode instance)
ewoutkramer
requested changes
Apr 25, 2025
test/Firely.Fhir.Validation.Compilation.Tests.Shared/FhirTestCases
Outdated
Show resolved
Hide resolved
…ix-context-validation # Conflicts: # test/Firely.Fhir.Validation.Compilation.Tests.Shared/ExtensionContextComponentTests.cs
…ix-context-validation
…ix-context-validation # Conflicts: # test/Firely.Fhir.Validation.Compilation.Tests.Shared/FhirTestCases
ewoutkramer
approved these changes
Apr 30, 2025
…ix-context-validation
…ix-context-validation # Conflicts: # test/Firely.Fhir.Validation.Compilation.Tests.Shared/FhirTestCases
…ix-context-validation
ewoutkramer
approved these changes
May 28, 2025
…ix-context-validation # Conflicts: # test/Firely.Fhir.Validation.Compilation.Tests.Shared/FhirTestCases
Base automatically changed from
feature/upgrade-sdk-to-6.0.0-alpha2
to
develop-sdk6
June 18, 2025 15:16
andrzejskowronski
approved these changes
Jun 24, 2025
This was referenced Oct 27, 2025
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.
Description
Fixed contextValidation subtype detection.
Related issues
Closes #402
Testing
Added new test to more meticulously test extension context validation of type "Element"
Also review FirelyTeam/fhir-test-cases#62