update Playground pages to run

This commit is contained in:
Mathew Polzin
2019-11-15 17:46:53 -08:00
parent 8ee04d8932
commit c7696d83fa
2 changed files with 4 additions and 4 deletions
@@ -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)