Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
data GList (a :: [*]) where Source #
Data structure used in order to specify generators for API
Example usage:
type Api = "cats" :> ReqBody '[JSON] Cat :> Post '[JSON] () catGen :: Gen Cat catGen = _ genApi :: Gen (BaseUrl -> Request) genApi = genRequest (Proxy @Api) (catGen :*: GNil)
class GenRequest (api :: *) (gens :: [*]) where Source #
Type class used to generate requests from a 'GList gens' for API api
Instances
ReflectMethod method => GenRequest (NoContentVerb method) gens Source # | |
Defined in Hedgehog.Servant genRequest :: Proxy (NoContentVerb method) -> GList gens -> Gen (BaseUrl -> Request) Source # | |
(GenRequest a reqs, GenRequest b reqs) => GenRequest (a :<|> b) reqs Source # | Instance for composite APIs |
Defined in Hedgehog.Servant | |
GenRequest api gens => GenRequest (WithNamedContext x y api) gens Source # | This instance doees not do anything right now Note: in order to use features provided by this type in the API, you'll need to manually adjust the generated request. |
Defined in Hedgehog.Servant genRequest :: Proxy (WithNamedContext x y api) -> GList gens -> Gen (BaseUrl -> Request) Source # | |
ReflectMethod method => GenRequest (UVerb method contentTypes bodies) gens Source # | |
Defined in Hedgehog.Servant | |
GenRequest api gens => GenRequest (HttpVersion :> api) gens Source # | This instance doees not do anything right now Note: in order to use features provided by this type in the API, you'll need to manually adjust the generated request. |
Defined in Hedgehog.Servant genRequest :: Proxy (HttpVersion :> api) -> GList gens -> Gen (BaseUrl -> Request) Source # | |
(AllMimeRender contentTypes body, HasGen body gens, GenRequest api gens) => GenRequest (ReqBody' mods contentTypes body :> api) gens Source # | Instance for request body |
GenRequest api gens => GenRequest (RemoteHost :> api) gens Source # | This instance doees not do anything right now Note: in order to use features provided by this type in the API, you'll need to manually adjust the generated request. |
Defined in Hedgehog.Servant genRequest :: Proxy (RemoteHost :> api) -> GList gens -> Gen (BaseUrl -> Request) Source # | |
(KnownSymbol paramName, ToHttpApiData param, HasGen param gens, GenRequest api gens) => GenRequest (QueryParam' mods paramName param :> api) gens Source # | Instance for setting query parameters Note: this instance currently makes all query params mandatory |
Defined in Hedgehog.Servant genRequest :: Proxy (QueryParam' mods paramName param :> api) -> GList gens -> Gen (BaseUrl -> Request) Source # | |
(KnownSymbol paramName, HasGen param gens, ToHttpApiData param, GenRequest api gens) => GenRequest (QueryParams paramName param :> api) gens Source # | Instance for generating query parameters for arrays of values |
Defined in Hedgehog.Servant genRequest :: Proxy (QueryParams paramName param :> api) -> GList gens -> Gen (BaseUrl -> Request) Source # | |
(KnownSymbol name, GenRequest api gens) => GenRequest (QueryFlag name :> api) gens Source # | Instance for setting query flag Note: this instance currently makes all query flags mandatory |
(HasGen header gens, KnownSymbol headerName, ToHttpApiData header, GenRequest api gens) => GenRequest (Header' mods headerName header :> api) gens Source # | Instance for headers Note: this instance currently makes all headers mandatory |
GenRequest api gens => GenRequest (IsSecure :> api) gens Source # | This instance doees not do anything right now Note: in order to use features provided by this type in the API, you'll need to manually adjust the generated request. |
GenRequest api reqs => GenRequest (Summary s :> api) reqs Source # | Instance for summary |
GenRequest api reqs => GenRequest (Description d :> api) reqs Source # | Instance for description |
Defined in Hedgehog.Servant genRequest :: Proxy (Description d :> api) -> GList reqs -> Gen (BaseUrl -> Request) Source # | |
(ToHttpApiData a, HasGen a gens, GenRequest api gens) => GenRequest (Capture' modifiers sym a :> api) gens Source # | Instance for path capture |
(ToHttpApiData a, HasGen a gens, GenRequest api gens) => GenRequest (CaptureAll sym a :> api) gens Source # | Instance for capture rest of path, e.g: type Api = "cats" :> CaptureAll "rest" Text :> Get '[JSON] [Cat] For simplicity this will generate a number of paths from 0 to 10 linearly |
Defined in Hedgehog.Servant genRequest :: Proxy (CaptureAll sym a :> api) -> GList gens -> Gen (BaseUrl -> Request) Source # | |
GenRequest api gens => GenRequest (BasicAuth x y :> api) gens Source # | This instance doees not do anything right now Note: in order to use features provided by this type in the API, you'll need to manually adjust the generated request. |
GenRequest api gens => GenRequest (Vault :> api) gens Source # | This instance doees not do anything right now Note: in order to use features provided by this type in the API, you'll need to manually adjust the generated request. |
(KnownSymbol path, GenRequest api reqs) => GenRequest (path :> api) reqs Source # | Instance for path part of API |
Defined in Hedgehog.Servant | |
ReflectMethod method => GenRequest (Verb method status contentTypes body) gens Source # | Instnace for capturing verb e.g. |
Defined in Hedgehog.Servant |