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
genRequest :: Proxy api -> GList gens -> Gen (BaseUrl -> Request) Source #
Instances
(GenRequest a reqs, GenRequest b reqs) => GenRequest (a :<|> b) reqs Source # | Instance for composite APIs |
Defined in Hedgehog.Servant genRequest :: Proxy (a :<|> b) -> GList reqs -> Gen (BaseUrl -> Request) Source # | |
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 # | |
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. |
Defined in Hedgehog.Servant genRequest :: Proxy (BasicAuth x y :> api) -> GList gens -> Gen (BaseUrl -> Request) Source # | |
(ToHttpApiData a, HasGen a gens, GenRequest api gens) => GenRequest (Capture' modifiers sym a :> api) gens Source # | Instance for path capture |
Defined in Hedgehog.Servant genRequest :: Proxy (Capture' modifiers sym a :> api) -> GList gens -> Gen (BaseUrl -> Request) Source # | |
(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 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 # | |
GenRequest api reqs => GenRequest (Summary s :> api) reqs Source # | Instance for summary |
Defined in Hedgehog.Servant genRequest :: Proxy (Summary s :> api) -> GList reqs -> Gen (BaseUrl -> Request) Source # | |
(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 |
Defined in Hedgehog.Servant genRequest :: Proxy (Header' mods headerName header :> api) -> GList gens -> Gen (BaseUrl -> Request) Source # | |
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. |
Defined in Hedgehog.Servant genRequest :: Proxy (IsSecure :> 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 |
Defined in Hedgehog.Servant genRequest :: Proxy (QueryFlag name :> 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 # | |
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 # | |
(AllMimeRender contentTypes body, HasGen body gens, GenRequest api gens) => GenRequest (ReqBody' mods contentTypes body :> api) gens Source # | Instance for request body |
Defined in Hedgehog.Servant genRequest :: Proxy (ReqBody' mods contentTypes body :> api) -> GList gens -> Gen (BaseUrl -> Request) Source # | |
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. |
Defined in Hedgehog.Servant genRequest :: Proxy (Vault :> api) -> GList gens -> Gen (BaseUrl -> Request) Source # | |
(KnownSymbol path, GenRequest api reqs) => GenRequest (path :> api) reqs Source # | Instance for path part of API |
Defined in Hedgehog.Servant genRequest :: Proxy (path :> api) -> GList reqs -> Gen (BaseUrl -> Request) Source # | |
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 (Verb method status contentTypes body) gens Source # | Instnace for capturing verb e.g. |
Defined in Hedgehog.Servant genRequest :: Proxy (Verb method status contentTypes body) -> GList gens -> Gen (BaseUrl -> Request) Source # |