mirror of
https://github.com/encounter/JSONAPI.git
synced 2026-07-10 12:18:40 -07:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f41521e33b | |||
| 45ec7ba753 |
@@ -66,7 +66,7 @@ If you find something wrong with this library and it isn't already mentioned und
|
|||||||
### Swift Package Manager
|
### Swift Package Manager
|
||||||
Just include the following in your package's dependencies and add `JSONAPI` to the dependencies for any of your targets.
|
Just include the following in your package's dependencies and add `JSONAPI` to the dependencies for any of your targets.
|
||||||
```
|
```
|
||||||
.package(url: "https://github.com/mattpolzin/JSONAPI.git", .upToNextMajor(from: "2.2.0"))
|
.package(url: "https://github.com/mattpolzin/JSONAPI.git", .upToNextMajor(from: "3.0.0"))
|
||||||
```
|
```
|
||||||
|
|
||||||
### Xcode project
|
### Xcode project
|
||||||
@@ -317,11 +317,13 @@ Literal expressibility for `Attribute`, `ToOneRelationship`, and `Id` are provid
|
|||||||
|
|
||||||
For example, you could create a mock `Author` (from the above example) as follows
|
For example, you could create a mock `Author` (from the above example) as follows
|
||||||
```swift
|
```swift
|
||||||
let author = Author(id: "1234", // You can just use a String directly as an Id
|
let author = Author(
|
||||||
|
id: "1234", // You can just use a String directly as an Id
|
||||||
attributes: .init(name: "Janice Bluff"), // The name Attribute does not need to be initialized, you just use a String directly.
|
attributes: .init(name: "Janice Bluff"), // The name Attribute does not need to be initialized, you just use a String directly.
|
||||||
relationships: .none,
|
relationships: .none,
|
||||||
meta: .none,
|
meta: .none,
|
||||||
links: .none)
|
links: .none
|
||||||
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Resource Object `check()`
|
## Resource Object `check()`
|
||||||
|
|||||||
Reference in New Issue
Block a user