In order to reduce the burden of conflict on users of the library, JSONAPI.Identifiable has been renamed to JSONAPIIdentifiable and (for all platforms that support it) conformance to Swift.Identifiable has been added to ResourceObject.
⚠️ Breaking Changes ⚠️
Sorry to introduce a breaking change during the release candidates. Conformance to Swift.Identifiable is really beneficial, especially if you ever pull a model into SwiftUI. This change also reduces the confusing ResourceObject.Id/ResourceObject.Identifier situation down to just a single ResourceObject.ID.
Renamed Identifiable -> JSONAPIIdentifiable
Renamed JSONAPIIdentifiable's Identifier associated type to ID to match that of the Swift Identifiable type.
Removed ResourceObject.Id (i.e. consolidated so that the same type alias as is used by JSONAPIIdentifiable and Swift.Identifiable is just named ResourceObject.ID). Otherwise there is a confusing co-existence of both ResourceObject.ID and ResourceObject.Id.
Suggested approach to updating code:
Anywhere you are using JSONAPI.Identifiable, find JSONAPI.Identifiable or Identifiable (careful not to pick up on Swift Identifiable in your codebase) and replace with JSONAPIIdentifiable.
Anywhere you are using Identifier() or Id() in the context of a ResourceObject to construct its ID, replace with ID().
In order to reduce the burden of conflict on users of the library,
JSONAPI.Identifiable
has been renamed toJSONAPIIdentifiable
and (for all platforms that support it) conformance toSwift.Identifiable
has been added toResourceObject
.⚠️ Breaking Changes ⚠️ Sorry to introduce a breaking change during the release candidates. Conformance to
Swift.Identifiable
is really beneficial, especially if you ever pull a model into SwiftUI. This change also reduces the confusingResourceObject.Id
/ResourceObject.Identifier
situation down to just a singleResourceObject.ID
.Identifiable
->JSONAPIIdentifiable
JSONAPIIdentifiable
'sIdentifier
associated type toID
to match that of the SwiftIdentifiable
type.ResourceObject.Id
(i.e. consolidated so that the same type alias as is used byJSONAPIIdentifiable
andSwift.Identifiable
is just namedResourceObject.ID
). Otherwise there is a confusing co-existence of bothResourceObject.ID
andResourceObject.Id
.Suggested approach to updating code:
JSONAPI.Identifiable
, findJSONAPI.Identifiable
orIdentifiable
(careful not to pick up on SwiftIdentifiable
in your codebase) and replace withJSONAPIIdentifiable
.Identifier()
orId()
in the context of aResourceObject
to construct its ID, replace withID()
.