| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Servant.QuickCheck.Internal.HasGenRequest
- runGenRequest :: HasGenRequest a => Proxy a -> Gen (BaseUrl -> Request)
- class HasGenRequest a where
Documentation
runGenRequest :: HasGenRequest a => Proxy a -> Gen (BaseUrl -> Request) Source #
This function returns a QuickCheck `Gen a` when passed a servant API value,
typically a `Proxy API`. The generator returned is a function
that accepts a BaseUrl and returns a Request, which can then be used
to issue network requests. This Gen type makes it easier to compare distinct
APIs across different BaseUrls.
class HasGenRequest a where Source #
This is the core Servant-Quickcheck generator, which, when given a `Proxy API`
will return a pair of Int and `Gen a`, where a is a function from
BaseUrl to a Request. The Int is a weight for the
QuickCheck frequency function which ensures a random distribution across
all endpoints in an API.
Minimal complete definition
Instances