You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -146,11 +146,11 @@ An `Entity` needs to be specialized on four generic types. The first is the `Ent
146
146
147
147
#### `Meta`
148
148
149
-
The second generic specialization on `Entity` is `Meta`. This is described in its own section [below](#meta). All `Meta` at any level of a JSON API Document follow the same rules.
149
+
The second generic specialization on `Entity` is `Meta`. This is described in its own section [below](#jsonapi.meta). All `Meta` at any level of a JSON API Document follow the same rules.
150
150
151
151
#### `Links`
152
152
153
-
The third generic specialization on `Entity` is `Links`. This is described in its own section [below](#links). All `Links` at any level of a JSON API Document follow the same rules, although the **SPEC** makes different suggestions as to what types of links might live on which parts of the Document.
153
+
The third generic specialization on `Entity` is `Links`. This is described in its own section [below](#jsonnapi.links). All `Links` at any level of a JSON API Document follow the same rules, although the **SPEC** makes different suggestions as to what types of links might live on which parts of the Document.
154
154
155
155
#### `IdType`
156
156
@@ -322,7 +322,7 @@ You can always use `NoMetadata` if this JSON API feature is not needed.
322
322
323
323
#### `LinksType`
324
324
325
-
The third generic type of a `JSONAPIDocument` is a `Links` struct. `Links` are described in their own section [below](#links).
325
+
The third generic type of a `JSONAPIDocument` is a `Links` struct. `Links` are described in their own section [below](#jsonapi.links).
326
326
327
327
#### `IncludeType`
328
328
@@ -346,19 +346,19 @@ You can supply any `JSONAPI.Meta` type as the metadata type of the API descripti
346
346
347
347
The final generic type of a `JSONAPIDocument` is the `Error`. You should create an error type that can decode all the errors you expect your `JSONAPIDocument` to be able to decode. As prescribed by the **SPEC**, these errors will be found in the root document member `errors`.
348
348
349
-
### `Meta`
349
+
### `JSONAPI.Meta`
350
350
351
351
A `Meta` struct is totally open-ended. It is described by the **SPEC** as a place to put any information that does not fit into the standard JSON API Document structure anywhere else.
352
352
353
353
You can specify `NoMetadata` if the part of the document being described should not contain any `Meta`.
354
354
355
-
### `Links`
355
+
### `JSONAPI.Links`
356
356
357
357
A `Links` struct must contain only `Link` properties. Each `Link` property can either be a `URL` or a `URL` and some `Meta`. Each part of the document has some suggested common `Links` to include but generally any link can be included.
358
358
359
359
You can specify `NoLinks` if the part of the document being described should not contain any `Links`.
360
360
361
-
### `RawIdType`
361
+
### `JSONAPI.RawIdType`
362
362
363
363
If you want to create new `JSONAPI.Entity` values and assign them Ids then you will need to conform at least one type to `CreatableRawIdType`. Doing so is easy; here are two example conformances for `UUID` and `String` (via `UUID`):
0 commit comments