Skip to content

fix: handle XML namespace in test file deserialization#5

Open
smunini wants to merge 1 commit intobrianpos:masterfrom
HeliosSoftware:fix/xml-namespace-deserialization
Open

fix: handle XML namespace in test file deserialization#5
smunini wants to merge 1 commit intobrianpos:masterfrom
HeliosSoftware:fix/xml-namespace-deserialization

Conversation

@smunini
Copy link

@smunini smunini commented Feb 11, 2026

Summary

  • Upstream fhir-test-cases added xmlns="http://hl7.org/fhirpath/tests" to tests-fhir-r5.xml (commit), breaking XmlSerializer deserialization since TestFileDefinition.cs declares [XmlRoot(ElementName = "tests")] without a namespace.
  • Added a DeserializeTests helper that detects the root element's namespace at runtime and passes it to XmlSerializer when present, handling both old (no namespace) and new formats.
  • Added TestDeserializeLatestTestsXml test that downloads the current upstream XML and verifies namespace-aware deserialization works.

Upstream fhir-test-cases added xmlns="http://hl7.org/fhirpath/tests" to
tests-fhir-r5.xml, breaking XmlSerializer deserialization. Add a
DeserializeTests helper that detects the root element namespace at
runtime and passes it to XmlSerializer when present. Also add a test
that downloads the latest upstream XML to verify compatibility.
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.

1 participant