2022-02-10 14:36:53 +00:00
|
|
|
-------------------------------------------------------------------
|
2022-02-11 02:02:41 +00:00
|
|
|
Wed Feb 2 13:15:43 UTC 2022 - Peter Simons <psimons@suse.com>
|
2022-02-10 14:36:53 +00:00
|
|
|
|
|
|
|
- Update servant to version 0.19.
|
|
|
|
Package versions follow the [Package Versioning Policy](https://pvp.haskell.org/): in A.B.C, bumps to either A or B represent major versions.
|
|
|
|
|
|
|
|
0.19
|
|
|
|
----
|
|
|
|
|
|
|
|
### Significant changes
|
|
|
|
|
|
|
|
- Drop support for GHC < 8.6.
|
|
|
|
- Support GHC 9.0 (GHC 9.2 should work as well, but isn't fully tested yet).
|
|
|
|
- Support Aeson 2 ([#1475](https://github.com/haskell-servant/servant/pull/1475)),
|
|
|
|
which fixes a [DOS vulnerability](https://github.com/haskell/aeson/issues/864)
|
|
|
|
related to hash collisions.
|
|
|
|
- Add `NamedRoutes` combinator, making support for records first-class in Servant
|
|
|
|
([#1388](https://github.com/haskell-servant/servant/pull/1388)).
|
|
|
|
|
|
|
|
Users can now directly mark part as an API as defined by a record, instead of
|
|
|
|
using `(:<|>)` to combine routes. Concretely, the anonymous:
|
|
|
|
|
|
|
|
```haskell
|
|
|
|
type API =
|
|
|
|
"version" :> Get '[JSON] String :<|>
|
|
|
|
"products" :> Get '[JSON] [Product]
|
|
|
|
```
|
|
|
|
|
|
|
|
can be replaced with the explicitly-named:
|
|
|
|
|
|
|
|
```haskell
|
|
|
|
type API = NamedRoutes NamedAPI
|
|
|
|
data NamedAPI mode = NamedAPI
|
|
|
|
{ version :: mode :- "version" :> Get '[JSON] String
|
|
|
|
, products :: mode :- "products" :> Get '[JSON] [Product]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
`NamedRoutes` builds upon `servant-generic`, but improves usability by freeing
|
|
|
|
users from the need to perform `toServant` / `fromServant` conversions
|
|
|
|
manually. Serving `NamedRoutes NamedAPI` is now done directly by providing a
|
|
|
|
record of handlers, and servant generates clients directly as records as well.
|
|
|
|
In particular, it makes it much more practical to work with nested hierarchies
|
|
|
|
of named routes.
|
|
|
|
|
|
|
|
Two convenience functions, `(//)` and `(/:)`, have been added to make the
|
|
|
|
usage of named route hierarchies more pleasant:
|
|
|
|
|
|
|
|
```haskell
|
|
|
|
rootClient :: RootApi (AsClientT ClientM)
|
|
|
|
rootClient = client (Proxy @API)
|
|
|
|
|
|
|
|
hello :: String -> ClientM String
|
|
|
|
hello name = rootClient // hello /: name
|
|
|
|
|
|
|
|
endpointClient :: ClientM Person
|
|
|
|
endpointClient = client // subApi /: "foobar123" // endpoint
|
|
|
|
|
|
|
|
type Api = NamedRoutes RootApi
|
|
|
|
|
|
|
|
data RootApi mode = RootApi
|
|
|
|
{ subApi :: mode :- Capture "token" String :> NamedRoutes SubApi
|
|
|
|
, hello :: mode :- Capture "name" String :> Get '[JSON] String
|
|
|
|
, …
|
|
|
|
} deriving Generic
|
|
|
|
|
|
|
|
data SubApi mode = SubApi
|
|
|
|
{ endpoint :: mode :- Get '[JSON] Person
|
|
|
|
, …
|
|
|
|
} deriving Generic
|
|
|
|
```
|
|
|
|
|
|
|
|
- Add custom type errors for partially applied combinators
|
|
|
|
([#1289](https://github.com/haskell-servant/servant/pull/1289),
|
|
|
|
[#1486](https://github.com/haskell-servant/servant/pull/1486)).
|
|
|
|
|
|
|
|
For example, forgetting to document the expected type for a query parameter,
|
|
|
|
as in:
|
|
|
|
|
|
|
|
``` haskell
|
|
|
|
type API = QueryParam "param" :> Get '[JSON] NoContent
|
|
|
|
```
|
|
|
|
|
|
|
|
will raise to the following error when trying to serve the API:
|
|
|
|
|
|
|
|
```
|
|
|
|
• There is no instance for HasServer (QueryParam'
|
|
|
|
'[Optional, Strict] "param" :> ...)
|
|
|
|
QueryParam' '[Optional, Strict] "1" expects 1 more arguments
|
|
|
|
```
|
|
|
|
|
|
|
|
As a consequence of this change, unsaturated types are now forbidden before `(:>)`.
|
|
|
|
|
|
|
|
- Add a `HeadNoContent` verb ([#1502](https://github.com/haskell-servant/servant/pull/1502)).
|
|
|
|
|
|
|
|
- *servant-client* / *servant-client-core* / *servant-http-streams*:
|
|
|
|
Fix erroneous behavior, where only 2XX status codes would be considered
|
|
|
|
successful, irrelevant of the status parameter specified by the verb
|
|
|
|
combinator. ([#1469](https://github.com/haskell-servant/servant/pull/1469))
|
|
|
|
|
|
|
|
- *servant-client* / *servant-client-core*: Fix `Show` instance for
|
|
|
|
`Servant.Client.Core.Request`.
|
|
|
|
|
|
|
|
- *servant-client* / *servant-client-core*: Allow passing arbitrary binary data
|
|
|
|
in Query parameters.
|
|
|
|
([#1432](https://github.com/haskell-servant/servant/pull/1432)).
|
|
|
|
|
|
|
|
- *servant-docs*: Generate sample cURL requests
|
|
|
|
([#1401](https://github.com/haskell-servant/servant/pull/1401/files)).
|
|
|
|
|
|
|
|
Breaking change: requires sample header values to be supplied with `headers`.
|
|
|
|
|
|
|
|
### Other changes
|
|
|
|
|
|
|
|
- Various bit rotten cookbooks have been updated and re-introduced on
|
|
|
|
[docs.servant.dev](https://docs.servant.dev).
|
|
|
|
|
|
|
|
- Various version bumps.
|
|
|
|
|
2021-09-07 19:01:14 +00:00
|
|
|
-------------------------------------------------------------------
|
|
|
|
Tue Sep 7 18:47:40 UTC 2021 - Ondřej Súkup <mimi.vx@gmail.com>
|
|
|
|
|
|
|
|
- relax constraints on base-compat
|
|
|
|
|
2021-08-17 15:29:51 +00:00
|
|
|
-------------------------------------------------------------------
|
|
|
|
Tue Aug 17 15:25:19 UTC 2021 - Ondřej Súkup <mimi.vx@gmail.com>
|
|
|
|
|
|
|
|
- relax constraints on transformers-compat
|
|
|
|
|
2021-05-30 18:58:18 +00:00
|
|
|
-------------------------------------------------------------------
|
2021-07-02 13:15:56 +00:00
|
|
|
Thu Jun 24 12:02:53 UTC 2021 - psimons@suse.com
|
|
|
|
|
|
|
|
- Update servant to version 0.18.3.
|
|
|
|
0.18.3
|
|
|
|
------
|
|
|
|
|
|
|
|
### Significant changes
|
|
|
|
|
|
|
|
- Add response header support to UVerb (#1420).
|
|
|
|
- Use Capture Description if available (#1423).
|
|
|
|
|
|
|
|
### Other changes
|
|
|
|
|
|
|
|
- Support GHC-9.0.1.
|
|
|
|
- Bump `bytestring`, `attoparsec`, `hspec` and `singleton-bool` dependencies.
|
|
|
|
|
|
|
|
-------------------------------------------------------------------
|
2021-05-30 18:58:18 +00:00
|
|
|
Sat May 15 15:56:17 UTC 2021 - psimons@suse.com
|
|
|
|
|
|
|
|
- Update servant to version 0.18.2 revision 1.
|
|
|
|
Upstream has revised the Cabal build instructions on Hackage.
|
|
|
|
|
2021-04-07 07:21:45 +00:00
|
|
|
-------------------------------------------------------------------
|
|
|
|
Tue Apr 6 13:22:48 UTC 2021 - Ondřej Súkup <mimi.vx@gmail.com>
|
|
|
|
|
|
|
|
- relax overconstrained deps on singleton-bool
|
|
|
|
|
2021-03-26 12:22:27 +00:00
|
|
|
-------------------------------------------------------------------
|
|
|
|
Thu Mar 25 15:46:03 UTC 2021 - Ondřej Súkup <mimi.vx@gmail.com>
|
|
|
|
|
|
|
|
- relax dep on attoparsec
|
|
|
|
|
2021-01-19 21:48:05 +00:00
|
|
|
-------------------------------------------------------------------
|
|
|
|
Tue Jan 19 20:10:01 UTC 2021 - Ondřej Súkup <mimi.vx@gmail.com>
|
|
|
|
|
|
|
|
- relax dep on http-api-data
|
|
|
|
|
2020-12-18 12:52:56 +00:00
|
|
|
-------------------------------------------------------------------
|
2020-12-19 18:29:18 +00:00
|
|
|
Thu Dec 17 12:20:00 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
|
2020-12-18 12:52:56 +00:00
|
|
|
|
2020-12-19 17:49:07 +00:00
|
|
|
- disable %{ix86} build
|
2020-12-18 12:52:56 +00:00
|
|
|
|
|
|
|
-------------------------------------------------------------------
|
|
|
|
Wed Dec 9 11:40:47 UTC 2020 - psimons@suse.com
|
|
|
|
|
|
|
|
- Add servant at version 0.18.2.
|
|
|
|
|