Skip to content
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

Added validation for the context of extensions #361

Merged
merged 32 commits into from
Oct 18, 2024

Conversation

Kasdejong
Copy link
Contributor

Description

The validator should now (finally) validate extension contexts against their expected context.

Related issues

Closes #267

Tests

Added tests for all possible extension contexts

# Conflicts:
#	src/Firely.Fhir.Validation/Impl/FhirPathValidator.cs
#	test/Firely.Fhir.Validation.Compilation.Tests.Shared/FhirTestCases
@Kasdejong Kasdejong marked this pull request as draft September 18, 2024 08:22
@Kasdejong Kasdejong removed the request for review from ewoutkramer September 18, 2024 15:32
@Kasdejong
Copy link
Contributor Author

We have an issue here (Apart from the fact that I seem to have done something weird with the subrepo). We do not step into every profile we encounter. This makes sense for some cases, except it makes verifying whether we are in the correct Element a lot harder, and as a bonus, I believe omitting it is a wrong assumption.

In a separate branch, I created a Patient with a link (backboneElement) with multiple id's and, lo and behold, the validation is a success! I believe us not invoking the profile of backboneElement is a mistake here. This would require quite a big change to the validator though, but it would make my work a LOT easier. I will leave this branch for now until we have discussed this internally.

@Kasdejong Kasdejong marked this pull request as ready for review October 2, 2024 12:43
@Kasdejong Kasdejong requested a review from ewoutkramer October 8, 2024 10:56
@ewoutkramer ewoutkramer enabled auto-merge October 14, 2024 12:59
@Kasdejong Kasdejong requested review from ewoutkramer and removed request for mmsmits October 18, 2024 10:06
Since BaseType needs to be serializable, I had to add [DataMember] to its only property.
@ewoutkramer ewoutkramer merged commit f3c2bcc into develop Oct 18, 2024
2 checks passed
@ewoutkramer ewoutkramer deleted the feature/extension-context-validation branch October 18, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Firely validator does not complain when extension is used outside of its context
2 participants