Copyright | (c) Rodrigo Setti 2017 |
---|---|
License | BSD3 |
Maintainer | rodrigosetti@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Exposes some functions to validate responses against a Swagger schema. There are four functions that can be used depending whether the response is parsed, if the operation is available (or just the id)
- parseResponse :: ByteString -> Either String HttpResponse
- validateResponseBytes :: ByteString -> Swagger -> OperationId -> Either String ()
- validateResponseWithOperation :: HttpResponse -> Swagger -> Operation -> Either String ()
- validateResponse :: HttpResponse -> Swagger -> OperationId -> Either String ()
Documentation
parseResponse :: ByteString -> Either String HttpResponse Source #
Parse a HttpResponse from ByteString
validateResponseBytes :: ByteString -> Swagger -> OperationId -> Either String () Source #
Validate a response, from a particular operation id, (encoded in a byte-string) against a Swagger schema
validateResponseWithOperation :: HttpResponse -> Swagger -> Operation -> Either String () Source #
Validate a response, from a particular operation against a Swagger schema
validateResponse :: HttpResponse -> Swagger -> OperationId -> Either String () Source #
Validate a response, from a particular operation id against a Swagger schema