mirror of
https://github.com/encounter/JSONAPI.git
synced 2026-03-30 11:18:38 -07:00
Add typealiases to make accessing Entity Relationships and Attributes types more convenient
This commit is contained in:
@@ -40,6 +40,9 @@ public protocol EntityDescription {
|
||||
public protocol EntityType: PrimaryResource {
|
||||
associatedtype Description: EntityDescription
|
||||
associatedtype Identifier: Equatable & Codable
|
||||
|
||||
typealias Attributes = Description.Attributes
|
||||
typealias Relationships = Description.Relationships
|
||||
}
|
||||
|
||||
/// An `Entity` is a single model type that can be
|
||||
|
||||
Reference in New Issue
Block a user