Safe Haskell | None |
---|---|
Language | Haskell2010 |
Internal module, use at your own risk.
- apiRoundtripSpecs :: HasGenericSpecs api => Proxy api -> Spec
- apiGoldenSpecs :: HasGenericSpecs api => Proxy api -> Spec
- apiSpecs :: HasGenericSpecs api => Proxy api -> Spec
- usedTypes :: HasGenericSpecs api => Proxy api -> [TypeRep]
- mkRoundtripSpecs :: HasGenericSpecs api => Proxy api -> [TypeSpec]
- class HasGenericSpecs api where
- data TypeSpec = TypeSpec {}
- class MkTypeSpecs a where
Documentation
apiRoundtripSpecs :: HasGenericSpecs api => Proxy api -> Spec Source #
Allows to obtain roundtrip tests for JSON serialization for all types used in a servant api.
See also roundtripSpecs
.
apiGoldenSpecs :: HasGenericSpecs api => Proxy api -> Spec Source #
Allows to obtain golden tests for JSON serialization for all types used in a servant api.
See also goldenSpecs
.
apiSpecs :: HasGenericSpecs api => Proxy api -> Spec Source #
Combination of apiRoundtripSpecs
and apiGoldenSpecs
.
mkRoundtripSpecs :: HasGenericSpecs api => Proxy api -> [TypeSpec] Source #
class HasGenericSpecs api where Source #
collectRoundtripSpecs :: Proxy api -> [TypeSpec] Source #
(HasGenericSpecs a, HasGenericSpecs b) => HasGenericSpecs ((:<|>) a b) Source # | |
(MkTypeSpecs body, HasGenericSpecs api) => HasGenericSpecs ((:>) * * (ReqBody * contentTypes body) api) Source # | |
HasGenericSpecs api => HasGenericSpecs ((:>) Symbol * path api) Source # | |
HasGenericSpecs (Verb StdMethod * method returnStatus contentTypes NoContent) Source # | |
MkTypeSpecs response => HasGenericSpecs (Verb StdMethod * method returnStatus contentTypes response) Source # | |
http methods
combinators
class MkTypeSpecs a where Source #
mkTypeSpecs :: Proxy a -> [TypeSpec] Source #
MkTypeSpecs () Source # | |
(Typeable * a, Eq a, Show a, Arbitrary a, ToJSON a, FromJSON a) => MkTypeSpecs a Source # | |
(Eq a, Show a, Typeable * a, Arbitrary a, ToJSON a, FromJSON a) => MkTypeSpecs [a] Source # | |
(Eq a, Show a, Typeable * a, Arbitrary a, ToJSON a, FromJSON a) => MkTypeSpecs (Maybe a) Source # | |