mirror of
https://github.com/encounter/JSONAPI.git
synced 2026-03-30 11:18:38 -07:00
update Playground pages to run
This commit is contained in:
+1
-1
@@ -37,7 +37,7 @@ typealias ToManyRelationship<Entity: Relatable> = JSONAPI.ToManyRelationship<Ent
|
||||
// JSON:API Documents for this particular API to have Metadata, Links,
|
||||
// useful Errors, or an APIDescription (The *SPEC* calls this
|
||||
// "API Description" the "JSON:API Object").
|
||||
typealias Document<PrimaryResourceBody: JSONAPI.ResourceBody, IncludeType: JSONAPI.Include> = JSONAPI.Document<PrimaryResourceBody, NoMetadata, NoLinks, IncludeType, NoAPIDescription, BasicJSONAPIError<String>>
|
||||
typealias Document<PrimaryResourceBody: JSONAPI.EncodableResourceBody, IncludeType: JSONAPI.Include> = JSONAPI.Document<PrimaryResourceBody, NoMetadata, NoLinks, IncludeType, NoAPIDescription, BasicJSONAPIError<String>>
|
||||
|
||||
// MARK: Entity Definitions
|
||||
|
||||
|
||||
@@ -64,11 +64,11 @@ if case let .data(bodyData) = peopleResponse.body {
|
||||
|
||||
// MARK: - Work in the abstract
|
||||
print("-----")
|
||||
func process<T: JSONAPIDocument>(document: T) {
|
||||
guard case let .data(body) = document.body else {
|
||||
func process<T: CodableJSONAPIDocument>(document: T) {
|
||||
guard let body = document.body.data else {
|
||||
return
|
||||
}
|
||||
let x: T.Body.Data = body
|
||||
let x: T.BodyData = body
|
||||
}
|
||||
process(document: peopleResponse)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user