haskell-servant / haskell-servant/servant
Optional ReqBody does not wrap it’s type into Maybe
Open
- Dominant language
- Haskell
- Stars
- 2k
- Forks
- 427
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 5
Description
Here is a minimal reproducible demo that shows the problem: https://gist.github.com/unclechu/347bbc386e0659242de80e8ff38b0ec6 (requires [Nix](https://nixos.org/download.html#nix-quick-install) to run). This demo also shows a trick how to overcome the problem.
Even when I define `ReqBody` with `Optional` mod:
``` haskell
ReqBody' '[Optional, Strict] '[JSON] SomeType
```
In the `Server` type `SomeType` stays the same, without `Maybe` wrap that I would also expect from `QueryParam` for instance.
Contributor guide
Assessment
This issue has not been assessed yet.