Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data DefaultErrorJson = DefaultErrorJson {}
- mkDefaultErrorJson :: String -> DefaultErrorJson
- mkValidator' :: ByteString -> Maybe Middleware
- mkValidator :: ToJSON a => (String -> a) -> ByteString -> Maybe Middleware
- mkRequestValidator' :: ByteString -> Maybe Middleware
- mkRequestValidator :: ToJSON a => (String -> a) -> ByteString -> Maybe Middleware
- mkResponseValidator' :: ByteString -> Maybe Middleware
- mkResponseValidator :: ToJSON a => (String -> a) -> ByteString -> Maybe Middleware
- requestValidator :: ToJSON a => (String -> a) -> ApiDefinition -> Middleware
- responseValidator :: ToJSON a => (String -> a) -> ApiDefinition -> Middleware
- getRequestBody :: Request -> IO (ByteString, Request)
- getResponseBody :: Response -> IO ByteString
- responseHeaders :: ResponseHeaders
- validateRequestBody :: StdMethod -> FilePath -> ByteString -> ByteString -> Either String [String]
- validateResponseBody :: StdMethod -> FilePath -> Int -> ByteString -> ByteString -> Either String [String]
Documentation
data DefaultErrorJson Source #
Instances
Show DefaultErrorJson Source # | |
Defined in Network.Wai.Middleware.Validation showsPrec :: Int -> DefaultErrorJson -> ShowS # show :: DefaultErrorJson -> String # showList :: [DefaultErrorJson] -> ShowS # | |
ToJSON DefaultErrorJson Source # | |
Defined in Network.Wai.Middleware.Validation toJSON :: DefaultErrorJson -> Value # toEncoding :: DefaultErrorJson -> Encoding # toJSONList :: [DefaultErrorJson] -> Value # toEncodingList :: [DefaultErrorJson] -> Encoding # |
mkDefaultErrorJson :: String -> DefaultErrorJson Source #
Make error string with JSON.
mkValidator' :: ByteString -> Maybe Middleware Source #
Make a middleware for Request/Response validation.
mkValidator :: ToJSON a => (String -> a) -> ByteString -> Maybe Middleware Source #
mkRequestValidator' :: ByteString -> Maybe Middleware Source #
Make a middleware for Requestion validation.
mkRequestValidator :: ToJSON a => (String -> a) -> ByteString -> Maybe Middleware Source #
mkResponseValidator' :: ByteString -> Maybe Middleware Source #
Make a middleware for Response validation.
mkResponseValidator :: ToJSON a => (String -> a) -> ByteString -> Maybe Middleware Source #
requestValidator :: ToJSON a => (String -> a) -> ApiDefinition -> Middleware Source #
responseValidator :: ToJSON a => (String -> a) -> ApiDefinition -> Middleware Source #
getRequestBody :: Request -> IO (ByteString, Request) Source #
getResponseBody :: Response -> IO ByteString Source #
validateRequestBody :: StdMethod -> FilePath -> ByteString -> ByteString -> Either String [String] Source #
validateResponseBody :: StdMethod -> FilePath -> Int -> ByteString -> ByteString -> Either String [String] Source #