We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 921bcef commit fcc1796Copy full SHA for fcc1796
1 file changed
Sources/JSONAPI/Resource/Entity.swift
@@ -43,6 +43,18 @@ public protocol EntityType: PrimaryResource {
43
44
typealias Attributes = Description.Attributes
45
typealias Relationships = Description.Relationships
46
+
47
+ /// The `Entity`'s Id. This can be of type `Unidentified` if
48
+ /// the entity is being created clientside and the
49
+ /// server is being asked to create a unique Id. Otherwise,
50
+ /// this should be of a type conforming to `IdType`.
51
+ var id: Identifier { get }
52
53
+ /// The JSON API compliant attributes of this `Entity`.
54
+ var attributes: Attributes { get }
55
56
+ /// The JSON API compliant relationships of this `Entity`.
57
+ var relationships: Relationships { get }
58
}
59
60
/// An `Entity` is a single model type that can be
0 commit comments