-
Notifications
You must be signed in to change notification settings - Fork 345
Breaking changes in 4.0
Marco Visser edited this page May 6, 2022
·
11 revisions
- The methods on the extension class
ObjectListExtensions
are made obsolete. -
Code<T>.Value
will throw instead of returningnull
whenObjectValue
contains an invalid enum member. - Removed the (dead) code for setting a resolver on the
ValidationContext
using theSetResolver()
andResolver()
extension methods. -
BooleanPattern
attribute removed. SinceFhirBoolean.Value
is 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
InvokeIValidatableObject
attribute, 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. -
ReflectionClass
removed (never made production ready or used, included by accident) -
PropertyMapping.TryCreate()
now requires aClassMapping
parameter for the declaring type. -
DotNetAttributeValidation.Validate/TryValidate
now are more strict and take a Base as the first parameter. Also, these have been changed into extension methods. -
LegacyFhirClient
is made obsolete and will be removed in the new major release. - Method
ValidateCode
ofITerminologyService
is removed and all classes that implement this interface the methodValidateCode
is 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
:
-
ElementDefinitionNavigatorExtensions
has its ElementDefinition-related extension methods moved toElementDefinitionExtensions
. -
TypeRefExtensions
has its ElementDefinition-related extension methods moved toElementDefinitionExtensions
. -
ProfileNavigationExtensions
has 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
ConstraintBestPractices
setting inValidationSettings
with values ofIgnore
,Enable
, andDisable
has been replaced byConstraintBestPracticesSeverity
with values ofWarning
andError
. 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-6
andrng-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.status
ConceptMap.group.element.target.equivalence
Group.characteristic.exclude
List.entry.deleted
-
MedicationRequest.substitution.allowed
For 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