servant-aeson-specs-0.4.1: generic tests for aeson serialization in servant

Safe HaskellNone
LanguageHaskell2010

Servant.Aeson.Internal

Contents

Description

Internal module, use at your own risk.

Synopsis

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.

usedTypes :: HasGenericSpecs api => Proxy api -> [TypeRep] Source #

Allows to retrieve a list of all used types in a servant api as TypeReps.

class HasGenericSpecs api where Source #

Minimal complete definition

collectRoundtripSpecs

Instances

(HasGenericSpecs a, HasGenericSpecs b) => HasGenericSpecs ((:<|>) a b) Source # 
(MkTypeSpecs body, HasGenericSpecs api) => HasGenericSpecs ((:>) * * (ReqBody * contentTypes body) api) Source # 

Methods

collectRoundtripSpecs :: Proxy * ((* :> *) (ReqBody * contentTypes body) api) -> [TypeSpec] Source #

HasGenericSpecs api => HasGenericSpecs ((:>) Symbol * path api) Source # 

Methods

collectRoundtripSpecs :: Proxy * ((Symbol :> *) path api) -> [TypeSpec] Source #

HasGenericSpecs (Verb StdMethod * method returnStatus contentTypes NoContent) Source # 

Methods

collectRoundtripSpecs :: Proxy * (Verb StdMethod * method returnStatus contentTypes NoContent) -> [TypeSpec] Source #

MkTypeSpecs response => HasGenericSpecs (Verb StdMethod * method returnStatus contentTypes response) Source # 

Methods

collectRoundtripSpecs :: Proxy * (Verb StdMethod * method returnStatus contentTypes response) -> [TypeSpec] Source #

http methods

combinators

data TypeSpec Source #

Constructors

TypeSpec 

Fields

class MkTypeSpecs a where Source #

Minimal complete definition

mkTypeSpecs

Methods

mkTypeSpecs :: Proxy a -> [TypeSpec] Source #

Instances