From c4f96c0376f27447d089be6530d6d1b0fd12e547 Mon Sep 17 00:00:00 2001 From: Mathew Polzin Date: Sun, 28 Jul 2019 13:10:42 -0700 Subject: [PATCH] Updated example in playground/documentation after realizing I was not using a variable I had created. --- .../Contents.swift | 2 +- README.md | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) 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 c8cbea1..e68aaa6 100644 --- a/JSONAPI.playground/Pages/Full Client & Server Example.xcplaygroundpage/Contents.swift +++ b/JSONAPI.playground/Pages/Full Client & Server Example.xcplaygroundpage/Contents.swift @@ -114,7 +114,7 @@ func articleDocument(includeAuthor: Bool) -> Either = .init(values: [.init(author)]) - return .init(document.including(.init(values: [.init(author)]))) + return .init(document.including(includes)) } } diff --git a/README.md b/README.md index de493ae..f00fafd 100644 --- a/README.md +++ b/README.md @@ -750,7 +750,7 @@ func articleDocument(includeAuthor: Bool) -> Either = .init(values: [.init(author)]) - return .init(document.including(.init(values: [.init(author)]))) + return .init(document.including(includes)) } } @@ -813,9 +813,9 @@ print(response.author) ``` # JSONAPI+Testing -The `JSONAPI` framework is packaged with a test library to help you test your `JSONAPI` integration. +The `JSONAPI` framework is packaged with a test library to help you test your `JSONAPI` integration. -The test library is called `JSONAPITesting`. It provides literal expressibility for `Attribute`, `ToOneRelationship`, and `Id` in many situations so that you can easily write test `ResourceObject` values into your unit tests. It also provides a `check()` function for each `ResourceObject` type that can be used to catch problems with your `JSONAPI` structures that are not caught by Swift's type system. +The test library is called `JSONAPITesting`. It provides literal expressibility for `Attribute`, `ToOneRelationship`, and `Id` in many situations so that you can easily write test `ResourceObject` values into your unit tests. It also provides a `check()` function for each `ResourceObject` type that can be used to catch problems with your `JSONAPI` structures that are not caught by Swift's type system. You can see the `JSONAPITesting` in action in the Playground included with the `JSONAPI` repository. @@ -823,8 +823,8 @@ You can see the `JSONAPITesting` in action in the Playground included with the ` This library has moved into its own Package. See https://github.com/mattpolzin/JSONAPI-Arbitrary for more information. # JSONAPI+OpenAPI -The `JSONAPI+OpenAPI` library generates OpenAPI compliant JSON Schema for models built with the `JSONAPI` library. If your Swift code is your preferred source of truth for API information, this is an easy way to document the response schemas of your API. +The `JSONAPI+OpenAPI` library generates OpenAPI compliant JSON Schema for models built with the `JSONAPI` library. If your Swift code is your preferred source of truth for API information, this is an easy way to document the response schemas of your API. -`JSONAPI+OpenAPI` also has experimental support for generating `JSONAPI` Swift code from Open API documentation (this currently lives on the `feature/gen-swift` branch). +`JSONAPI+OpenAPI` also has experimental support for generating `JSONAPI` Swift code from Open API documentation (this currently lives on the `feature/gen-swift` branch). See https://github.com/mattpolzin/JSONAPI-OpenAPI for more information.