packages feed

servant-validate-0.1.0.0: servant-validate.cabal

cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.34.2.
--
-- see: https://github.com/sol/hpack
--
-- hash: 9d03cea5ce068721828151ec4a161c3038d17f7dabe935243dfa8403378463db

name:           servant-validate
version:        0.1.0.0
synopsis:       Chekc static properties of servant APIs
description:    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
                ```
category:       Web
homepage:       https://github.com/mstksg/servant-validate#readme
bug-reports:    https://github.com/mstksg/servant-validate/issues
author:         Justin Le
maintainer:     justin@jle.im
copyright:      (c) 2021 Justin Le
license:        BSD3
license-file:   LICENSE
build-type:     Simple
extra-source-files:
    README.md
    CHANGELOG.md

source-repository head
  type: git
  location: https://github.com/mstksg/servant-validate

library
  exposed-modules:
      Servant.Validate
      Servant.Validate.Internal
  other-modules:
      Paths_servant_validate
  hs-source-dirs:
      src
  build-depends:
      base >=4.7 && <5
    , containers
    , servant
    , text
  default-language: Haskell2010

test-suite servant-validate-test
  type: exitcode-stdio-1.0
  main-is: Spec.hs
  other-modules:
      Paths_servant_validate
  hs-source-dirs:
      test
  ghc-options: -threaded -rtsopts -with-rtsopts=-N
  build-depends:
      base >=4.7 && <5
    , containers
    , hspec
    , servant
    , servant-validate
    , should-not-typecheck
    , text
  default-language: Haskell2010