Skip to content

Commit a8c4bf6

Browse files
committed
revert Self -> ResourceObject change but also try swapping out a typealias reference that seems to be confusing to the compiler for the thing that typealias references.
1 parent 87d43cc commit a8c4bf6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/JSONAPI/Resource/Resource Object/ResourceObject+Replacing.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public extension JSONAPI.ResourceObject {
1515
/// - parameters:
1616
/// - replacement: A function that takes the existing `attributes` and returns the replacement.
1717
func replacingAttributes(_ replacement: (Description.Attributes) -> Description.Attributes) -> Self {
18-
return ResourceObject(id: id,
18+
return Self(id: id,
1919
attributes: replacement(attributes),
2020
relationships: relationships,
2121
meta: meta,

Sources/JSONAPI/Resource/Resource Object/ResourceObject.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public struct ResourceObject<Description: JSONAPI.ResourceObjectDescription, Met
128128
/// the entity is being created clientside and the
129129
/// server is being asked to create a unique Id. Otherwise,
130130
/// this should be of a type conforming to `IdType`.
131-
public let id: ResourceObject.Id
131+
public let id: JSONAPI.Id<EntityRawIdType, Self>
132132

133133
/// The JSON API compliant attributes of this `ResourceObject`.
134134
public let attributes: Description.Attributes

0 commit comments

Comments
 (0)