servant-validate: Chekc static properties of servant APIs
A package with "test suites" to help verify that your servant APIs are valid at compile-time.
Currently the only property tested is that there are no duplicated paths.
```haskell data DeadlySinEnum = Lust | Gluttony | Greed | Sloth | Wrath | Envy | Pride
type MathApi = "sin" :> ReqBody '[JSON] Double :> Post '[JSON] NoContent type SatanApi = "sin" :> ReqBody '[JSON] DeadlySinEnum :> Post '[JSON] NoContent
type MyApi = MathApi :| SatanApi
myApi :: Proxy MyApi myApi = Proxy
validMyApi :: ValidApiTree MyApi validMyApi = validApiTree myApi ```
```haskell warning: [-Wdeferred-type-errors] • Duplicate method in API at path /sin: POST • In the expression: validApiTree myApi In an equation for ‘validMyApi’: validMyApi = validApiTree myApi ```
[Skip to Readme]
Downloads
- servant-validate-0.1.0.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1.0.0 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | base (>=4.7 && <5), containers, servant, text [details] |
| License | BSD-3-Clause |
| Copyright | (c) 2021 Justin Le |
| Author | Justin Le |
| Maintainer | justin@jle.im |
| Category | Web |
| Home page | https://github.com/mstksg/servant-validate#readme |
| Bug tracker | https://github.com/mstksg/servant-validate/issues |
| Source repo | head: git clone https://github.com/mstksg/servant-validate |
| Uploaded | by jle at 2021-02-19T05:26:33Z |
| Distributions | NixOS:0.1.0.0 |
| Downloads | 327 total (1 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs uploaded by user Build status unknown [no reports yet] |