Commit 5c6aa1c
committed
0.20.2
----
- Full query string helpers [#1604](haskell-servant/servant#1604)
This PR introduces `DeepQuery`, a route combinator that implements a pattern commonly known as deep objects.
It builds upon the convention of using `[]` for a list of parameters:
`books?filter[search]=value&filter[author][name]=value`.
The corresponding type would be `DeepQuery "filter" BookQuery :> Get '[JSON] [Book]`.
- Add IsIn instance for NamedRoutes [#1707](haskell-servant/servant#1707)
- Renamed `AtLeastOneFragment` type class to `AtMostOneFragment` [#1727](haskell-servant/servant#1727)
The previously named `AtLeastOneFragment` type class defined in the
`Servant.API.TypeLevel` module has been renamed to `AtMostOneFragment`,
since the previous name was misleading.
- Use `Header'` in response headers. [#1697](haskell-servant/servant#1697)
Use `Header'` instead of `Header` in response, so it's possible to provide
`Description`, for example:
```
type PaginationTotalCountHeader =
Header'
'[ Description "Indicates to the client total count of items in collection"
, Optional
, Strict
]
"Total-Count"
Int
```
Note: if you want to add header with description you should use `addHeader'`
or `noHeader'` which accepts `Header'` with all modifiers.1 parent 0d4a90a commit 5c6aa1c
4 files changed
Lines changed: 22 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
18 | 14 | | |
19 | 15 | | |
20 | | - | |
21 | 16 | | |
22 | 17 | | |
23 | | - | |
24 | | - | |
25 | 18 | | |
26 | 19 | | |
27 | 20 | | |
28 | 21 | | |
29 | 22 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 23 | | |
35 | 24 | | |
36 | 25 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
| 128 | + | |
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | | - | |
15 | 18 | | |
16 | 19 | | |
17 | | - | |
18 | | - | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | 25 | | |
29 | 26 | | |
30 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments