Repository navigation
6.7.0
Intro:
This release adds an opt-in PrimitiveValueConverter hook to the POCO deserializers, makes the
JSON parser reject a primitive whose value is supplied twice, keeps repeated same-url extensions in
snapshots, makes the SnapshotGenerator report differential paths with an empty segment, and fixes
FHIRPath evaluation over invalid primitive values. LocalTerminologyService now returns the full
$validate-code result shape, and the terminology services accept repeated tx-resource
parameters. There are no breaking API changes, but several changes alter behaviour or output that
callers may depend on: the new fatal parser issue JSON135, the text of
OperationOutcome.IssueComponent.ToString(), warnings on inactive codes from $validate-code, and
$expand rejecting repeated 0..1 parameters. See the behavioural notes below.
Serialization
-
New
DeserializerSettings.PrimitiveValueConverterlets callers fix a wrongly typed primitive while
parsing, such as"valueInteger": "42"or"active": "true", in both Json and Xml and in every
mode,Ostrichincluded. It is called only for values that are not of the type the primitive
stores, plusdate,dateTime,instant,timeandinteger64, which can be the right type in
the wrong format. If it declines (returns the input) or throws aFormatException,
InvalidCastExceptionorOverflowException, the usual error is reported; any other exception
propagates. When not set, parsing is unaffected. -
The string overloads of the Json deserializers now encode into a pooled buffer instead of
allocating a freshbyte[]per parse, and the reader options the SDK uses are now public as
SerializationUtil.FhirJsonReaderOptions. See issue #3598. -
An exception thrown while reading an Xml attribute is no longer hidden behind
"Can only exit from a resource part.". -
The JSON parser now reports a fatal issue,
JSON135(PRIMITIVE_VALUE_SUPPLIED_TWICE), when a
primitive gets its value from bothnameand_name, e.g.{"name":"John","_name":"Johnny"}.
The second value used to be dropped silently, with only the non-fatalJSON134, so the
NoOverflow,RecoverableandBackwardsCompatiblemodes accepted the data loss. This applies in
either property order and to elements of primitive arrays.JSON134stays a non-fatal error for
a primitive under_namewhen no value was set yet. See issue #3533.Behavioural note: JSON that parsed before, with a non-fatal
JSON134, now fails to parse in
every mode exceptOstrichwhen bothnameand_namecarry a value.
FHIRPath
- An unparseable
instant,integer64,integer,positiveIntorunsignedIntvalue no longer
makes almost every FHIRPath expression that reaches it throw. Its value is now the unparsed
string, as it already was fordate,dateTimeandtime. Before, even$this is Reference
threw anInvalidOperationExceptionfor such a node, so a sweep like
descendants().where($this is Reference)failed on the whole resource. TheValuegetter of the
POCO still throws.
Snapshot generation
- The
SnapshotGeneratornow reports a specific issue (PROFILE_ELEMENTDEF_INVALID_PATH, code
10021) for a differential element whose path has an empty segment, such asObservation...unit,
and skips that element. Such an element used to produce a phantom elementObservation.in the
snapshot, and any constraint on it, like afixedString, was silently lost. The rest of the
differential is still processed. See issue #3591. - When a differential has several extensions with the same url, e.g. repeated
additional-binding
extensions on a binding, and the base already has one with that url, the snapshot now keeps all of
them. The first replaces the base extension, the rest are added next to it. They used to overwrite
each other, so only the last one survived. See issue #3625.
Terminology
-
LocalTerminologyService's ValueSet$validate-codenow returns the full result shape the HL7
terminology ecosystem tests expect:code,system,versionanddisplay, plus anissues
OperationOutcome with tx-issue-type codings and expressions relative to the input, for both valid
and invalid codes. ACodeableConceptinput is echoed back, and inactive or non-active concepts
getinactive/statusparameters.ValidateCodeResulthas new properties to read and write
these (CodeableConcept,NormalizedCode,CausedByUnknownSystem,UnknownSystem,Inactive,
Status), and newAdd*extension methods put an issue in itsissues. See issue #3631.Behavioural note: an inactive, retired or deprecated code now returns
result = truewith a
message(acode-commentwarning). For an unknown system,messagenow also says the
CodeSystem could not be found. -
The terminology services no longer reject an operation with repeated
tx-resourceparameters,
which the tx-ecosystem IG requires servers to accept. Only repeats of the operation's 0..1
parameters are rejected; known 0..* and unknown parameters pass through. Each typed*Parameters
class now lists its parameters in a publicKnownParameters.Behavioural note:
$expandnow gets the same check, so a repeatedurl,filter,count
etc. is rejected where it used to be accepted.
Other
-
PocoNode.Resolve("#id")no longer throws aNullReferenceExceptionwhen the resource has a
contained resource without anidbefore the one it refers to. A contained resource without an
iddoes not match, and resolution continues. See issue #3613. -
OperationOutcome.IssueComponent.ToString()now writes a space before(further diagnostics:,
as it already did before(at. See issue #3621.Behavioural note: this changes the rendered text of an issue. Tests that compare against
ToString()output need new expected strings.
Changes:
- #3634: VONK-10389: Allow repeated tx-resource parameters
- #3633: Return the full $validate-code result shape from LocalTerminologyService
- #3631: Extend ValidateCodeResult with the full $validate-code output and fill it from LocalTerminologyService
- #3627: VONK-10125: Add opt-in primitive value converter to the POCO deserializers, pool Json string parsing
- #3598: POCO deserialization: byte/stream entry points and pooled re-encoding of JSON strings
- #3626: Keep repeated same-url extensions in snapshots
- #3625: Snapshot generator loses repeated extensions with the same URL (e.g. additional-binding) when the base already has one
- #3624: Bump the runtime-dependencies-minor group with 2 updates
- #3623: Make FHIRPath tolerate unparseable primitive values
- #3616: Document the changes for release, bump version to 6.6.0
See More
- #3622: Add space before "(further diagnostics:" in issue ToString
- #3619: Add test for Base-typed inline children (#3597)
- #3597: SnapshotGenerator: inline children of a new element typed
Baseare emitted one level up (segment dropped from path and id) - #3620: Report and skip '..' in differential paths
- #3618: Report fatal error when name and _name both set
- #3533: JSON deserializer silently drops a primitive value when both 'name' and '_name' supply one (non-fatal)
- #3617: Fix Resolve NRE on contained resource w/o id
- #3591: SnapshotGenerator: '..' in differential path produces phantom element and silently drops the constraint
- #3576: feat: add the missing NOOVERFLOW preset to both deserializers (#3532)
- #3613: PocoNode.Resolve throws NullReferenceException when a contained resource has no id
This list of changes was auto generated.