Skip to content

Commit 685bab3

Browse files
authored
doc: v3 query as a service (#500)
* doc: v3 query as a service * fix doc errors * addressing PR comments * add server adapter sample * update submodules
1 parent eb1dc94 commit 685bab3

36 files changed

+1842
-26
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@
2222
[submodule "code-repos/zenstackhq/v3-doc-orm-policy"]
2323
path = code-repos/zenstackhq/v3-doc-orm-policy
2424
url = https://github.com/zenstackhq/v3-doc-orm-policy.git
25+
[submodule "code-repos/zenstackhq/v3-doc-server-adapter"]
26+
path = code-repos/zenstackhq/v3-doc-server-adapter
27+
url = https://github.com/zenstackhq/v3-doc-server-adapter
Submodule v3-doc-server-adapter added at 24d6599

docs/reference/server-adapters/api-handlers/rest.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ The factory function accepts an options object with the following fields:
101101

102102
- externalIdMapping
103103

104-
Optional. An `Record<string, string>` value that provides a mapping from model names (as defined in ZModel) to unique contraint name. This is useful when you for example want to expose natural keys in place of a surrogate keys:
104+
Optional. An `Record<string, string>` value that provides a mapping from model names (as defined in ZModel) to unique constraint name. This is useful when you for example want to expose natural keys in place of a surrogate keys:
105105

106106
```ts
107107
// Expose tags by unique name and not by ID, ie. /tag/blue intead of /tag/id
@@ -112,7 +112,7 @@ The factory function accepts an options object with the following fields:
112112
})
113113
```
114114

115-
Currentlly it is not possible to use custom index names. This also works for compound unique contraints just like for [compound IDs](#compound-id-fields).
115+
Currently it is not possible to use custom index names. This also works for compound unique constraints just like for [compound IDs](#compound-id-fields).
116116

117117

118118
## Endpoints and Features
@@ -408,15 +408,15 @@ You can use the `filter[:selector1][:selector2][...]=value` [query parameter fam
408408
409409
1. Filtering with multiple values
410410
411-
Multiple filter values can be separated by comma. Items statisfying any of the values will be returned.
411+
Multiple filter values can be separated by comma. Items satisfying any of the values will be returned.
412412
413413
```ts
414414
GET /api/post?filter[author]=1,2
415415
```
416416
417417
1. Multiple filters
418418
419-
A request can carry multiple filters. Only items statisfying all filters will be returned.
419+
A request can carry multiple filters. Only items satisfying all filters will be returned.
420420
421421
```ts
422422
GET /api/post?filter[author]=1&filter[published]=true
@@ -700,7 +700,7 @@ PUT /:type/:id
700700
PATCH /:type/:id
701701
```
702702
703-
Both `PUT` and `PATCH` do partial update and has exactly the same behavior.
703+
Both `PUT` and `PATCH` perform partial updates with identical behavior.
704704
705705
:::info
706706
Besides plain fields, you can also include relationships in the request body. Please note that this won't update the related resource; instead if only replaces the relationships. If you update a to-many relationship, the new collection will entirely replace the old one.
@@ -836,7 +836,7 @@ PATCH /:type/:id/relationships/:relationship
836836
```
837837

838838
:::info
839-
`PUT` and `PATCH` has exactly the same behavior and both relace the existing relationships with the new ones entirely.
839+
`PUT` and `PATCH` have identical behavior and both replace the existing relationships with the new ones entirely.
840840
:::
841841

842842
##### Status codes
@@ -917,7 +917,7 @@ The JSON:API specification doesn't have a native way to represent compound IDs.
917917
}
918918
```
919919

920-
You can use this ID value convension in places where an ID is needed, e.g., reading a single entity.
920+
You can use this ID value convention in places where an ID is needed, e.g., reading a single entity.
921921

922922
```ts
923923
GET /post/1_2

0 commit comments

Comments
 (0)