Repository navigation
Releases
Releases · apple/FHIRModels
Better Depth Tracking & Date Parsing
- Reverse course and replace
FHIRDecodingDepthTrackerwithJSONDecoder.maxFHIRModelsDepth. There now is on-by-default depth tracking, seeFHIRDecodingDepth.swift, implemented on top ofDecoder. Thanks to Lukas Kollmer for the analysis and proposal in #45 - Lower the deployment target back to iOS 15 / macOS 12 / watchOS 8 / tvOS 15, since dropping the custom depth tracker removed the
OSAllocatedUnfairLockdependency that had raised it in 0.9.2 (resolves #44) - Implement a custom, specialized, performance & safety -optimized date/time parser
Base64Binary & Linux fixes
- Make it compile on Linux again (resolves #43, thanks for the report Shinren Pan)
- Fix
Base64Binary, which didn't properly decode arbitraryData
0.9.2
- Make ValueX-decoding resistant to null values (now actually resolves #39, thanks for the report Harsh Surati)
- Implement a decoding depth counter through
FHIRDecodingDepthTrackerand provide a default implementation that throws when exceeding 64 levels. This is an arbitrary limit but is conceivably high enough to accommodate any FHIR payload. It can only be enforced if the user uses our providedJSONDecoder.fhirModelsReadyDecoder, see how to instantiate FHIR resources. Because we useOSAllocatedUnfairLockthis bumps the required OS versions for this repository - Other improvements, such as better reporting of the coding path when no ValueX is provided but one is required
0.9.1
The Sendable Release
- BREAKING CHANGES, The
SendableRelease: makes all types adopt Swift Sendable, which means:- All types are now structs, all abstract types protocols. Resources and elements used to be
open classand are nowpublic struct - The initializers and Codable interfaces didn't change, depending on how "FHIRModels" is used in your projects there may be zero to lots of adjustments necessary
- The top level
FHIRTypeprotocol is nowSendable - Abstract types, including but not exclusively
ResourceandDomainResource, can no longer be instantiated (and probably never needed to be), andFHIRAbstractResourcehas been removed - Specialized elements such as
Age,Count,Distance, andDurationare mere typealiases ofQuantity - Since the FHIR data models define recursive structures (e.g. "Patient" -> "Identifier" -> "Reference" -> "Identifier" -> ...), all-struct doesn't work in Swift. To work around this cyle,
IdentifierandReferenceare nowfinal class, Sendable - The second infinite loop is around
ResourceProxyandBundle. To break this cycle,ResourceProxy.bundleis now aindirect case - This finally addresses #26
- Bump Swift tools version to 6.2
- All types are now structs, all abstract types protocols. Resources and elements used to be
- Update build models to 6.0.0-ballot4 (http://build.fhir.org/)
0.8.0
- BREAKING CHANGES: update build models to 6.0.0-ballot3 (http://build.fhir.org/)
- Address #38 (thanks to Lukas Kollmer for the idea)
- Move some unit tests to Swift Testing; since with testing #39 cannot be reproduced, resolves #39
Full Changelog: 0.7.0...0.8.0
0.7.0
0.6.1
Update build to R6 ballot 2
Update build models to 6.0.0-ballot2
Add R5 and R4B models
This release adds modules for the recently published FHIR R5 (5.0.0) release and the previous FHIR R4B (4.3.0) release. These can be accessed using import ModelsR5 and import ModelsR4B, respectively.