-
Notifications
You must be signed in to change notification settings - Fork 353
Breaking changes in 4.0
Marco Visser edited this page May 6, 2022
·
11 revisions
- The methods on the extension class
ObjectListExtensionsare made obsolete. -
Code<T>.Valuewill throw instead of returningnullwhenObjectValuecontains an invalid enum member. - Removed the (dead) code for setting a resolver on the
ValidationContextusing theSetResolver()andResolver()extension methods. -
BooleanPatternattribute removed. SinceFhirBoolean.Valueis a bool, there is nothing to validate (it was dead code and unused already) -
DotnetAttributeValidation.BuildContext()made private, since it was never meant to be called directly (just a .NET4.0 shim) -
DotnetAttributeValidation.BuildResult()has been removed, as it was never meant to be called directly -
Base64Binary.IsValidValue()now validates whether the data is actually valid base64 data, instead of just running the HL7 supplied pattern. -
Canonical.IsValidValue()now uses the same validation asFhirUri.IsValidValue()(it's a subclass of it). -
FhirUrl.IsValidValue()now checks whether absolute urls actually start with "http" or "https:" -
Date.IsValidValue()now goes beyond the pattern by actually asserting the validity of the date. -
FhirDateTime.IsValidValue()now goes beyond the pattern by actually asserting the validity of the date/date. -
Time.IsValidValue()now goes beyond the pattern by actually asserting the validity of the time -
FhirDecimal.IsValidValue()goes beyond the pattern by actually asserting the validity of the decimal - Removed our own version of
IValidatableObject(since it was exactly the same as the one inSystem.ComponentModel.DataAnnotations. - Removed the
InvokeIValidatableObjectattribute, since this is exactly what the standard .NET DataAnnotations will do when one callsValidator.ValidateObject(), so this is no longer necessary. - Code is now validated using a
CodePatternAttribute, this corrects an omission. -
ReflectionClassremoved (never made production ready or used, included by accident) -
PropertyMapping.TryCreate()now requires aClassMappingparameter for the declaring type. -
DotNetAttributeValidation.Validate/TryValidatenow are more strict and take a Base as the first parameter. Also, these have been changed into extension methods. -
LegacyFhirClientis made obsolete and will be removed in the new major release. - Method
ValidateCodeofITerminologyServiceis removed and all classes that implement this interface the methodValidateCodeis made obsolete.
A set of useful extension methods on ElementDefinition (and components) had become scattered around the source code in the past years. We have concentrated them into a single class ElementDefinitionExtensions:
-
ElementDefinitionNavigatorExtensionshas its ElementDefinition-related extension methods moved toElementDefinitionExtensions. -
TypeRefExtensionshas its ElementDefinition-related extension methods moved toElementDefinitionExtensions. -
ProfileNavigationExtensionshas its ElementDefinition-related extension methods moved toElementDefinitionExtensions. -
TypeRefExtensions.IsChoice(this ElementDefinition)has been renamed toHasChoices() -
ElementDefinitionNavigatorExtensions.IsSlicing(this ElementDefinitionNavigator)has been removed. -
ElementDefinition.ChoiceTypes()has been removed.
- The
ConstraintBestPracticessetting inValidationSettingswith values ofIgnore,Enable, andDisablehas been replaced byConstraintBestPracticesSeveritywith values ofWarningandError. This means that constraints marked as "best practice" in the spec aren't being ignored by default anymore, but now result in a warning when they are not met. - A new setting has been added called 'ConstraintsToIgnore' which is a string array, including the keys of the constraints for the validator to ignore. By default the following constraints are ignored:
dom-6andrng-2. The user can obviously overwrite this list.
The FhirAttribite IsModifier has been added to Poco elements according to the FHIR specification. _summary=true is now depedent on IsModifier or InSummary.
The attribute InSummary=true is removed for the following pocos elements:
CarePlan.activity.detail.statusConceptMap.group.element.target.equivalenceGroup.characteristic.excludeList.entry.deleted-
MedicationRequest.substitution.allowedFor more information, see PR https://github.com/FirelyTeam/firely-net-sdk/pull/1810.
The following classes/interfaces have been moved to the common assembly Hl7.Fhir.Support.Poco:
- FhirOperationException
- ITerminologyService
- ResourceReferenceExtensions
- SearchParamsExtensions
- TokenExtensions
- IArtifactSource