-
Notifications
You must be signed in to change notification settings - Fork 345
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
Validation does not allow empty Content in Binary (Hl7.Fhir.R5) #2821
Comments
It is worth noting that HL7.Fhir.Model.Binary defines the following: /// <summary>
/// The actual content. Note: Element is replaced by 'Binary.data' since R4. Do not use this element 'content' with R4 and newer releases.
/// </summary>
[FhirElement("content", Order=70)]
[NotMapped(Since=FhirRelease.R4)]
[Cardinality(Min=1,Max=1)]
[DataMember]
public Hl7.Fhir.Model.Base64Binary ContentElement
{
get { return _ContentElement; }
set { _ContentElement = value; OnPropertyChanged("ContentElement"); }
} Though |
Yeah, one more side-effect caused by the fact that we use two fields instead of one. See also #2786. |
Maybe add |
Describe the bug
Generating a Bundle, including a Binary wrapped in an Entry, does not pass Validation. The Validation believes that Content should not be null. This requirement was true in R4, but should no longer apply in R5. Deserializing the message works correctly, but
bundle.Validate(recurse: true)
throws the following exception:To Reproduce
Expected behavior
.Validate(recurse: true)
should not return any validation error.Version used:
<PackageReference Include="Hl7.Fhir.R5" Version="5.8.1" />
The text was updated successfully, but these errors were encountered: