diff --git a/JSONAPI.playground/Pages/Full Client & Server Example.xcplaygroundpage/Contents.swift b/JSONAPI.playground/Pages/Full Client & Server Example.xcplaygroundpage/Contents.swift index eabd561..96a7168 100644 --- a/JSONAPI.playground/Pages/Full Client & Server Example.xcplaygroundpage/Contents.swift +++ b/JSONAPI.playground/Pages/Full Client & Server Example.xcplaygroundpage/Contents.swift @@ -37,7 +37,7 @@ typealias ToManyRelationship = JSONAPI.ToManyRelationship = JSONAPI.Document> +typealias Document = JSONAPI.Document> // MARK: Entity Definitions diff --git a/JSONAPI.playground/Pages/Usage.xcplaygroundpage/Contents.swift b/JSONAPI.playground/Pages/Usage.xcplaygroundpage/Contents.swift index e5434e5..5917bef 100644 --- a/JSONAPI.playground/Pages/Usage.xcplaygroundpage/Contents.swift +++ b/JSONAPI.playground/Pages/Usage.xcplaygroundpage/Contents.swift @@ -64,11 +64,11 @@ if case let .data(bodyData) = peopleResponse.body { // MARK: - Work in the abstract print("-----") -func process(document: T) { - guard case let .data(body) = document.body else { +func process(document: T) { + guard let body = document.body.data else { return } - let x: T.Body.Data = body + let x: T.BodyData = body } process(document: peopleResponse)