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
- type ValidationResult = Either String ()
- validateResponseBytes :: ByteString -> NormalizedSwagger -> OperationId -> ValidationResult
- validateResponseWithOperation :: HttpResponse -> NormalizedSwagger -> Operation -> ValidationResult
- validateResponse :: HttpResponse -> NormalizedSwagger -> OperationId -> ValidationResult
Documentation
parseResponse :: ByteString -> Either String HttpResponse Source #
Parse a HttpResponse from ByteString
type ValidationResult = Either String () Source #
validateResponseBytes :: ByteString -> NormalizedSwagger -> OperationId -> ValidationResult Source #
Validate a response, from a particular operation id, (encoded in a byte-string) against a Swagger schema
validateResponseWithOperation :: HttpResponse -> NormalizedSwagger -> Operation -> ValidationResult Source #
Validate a response, from a particular operation against a Swagger schema
validateResponse :: HttpResponse -> NormalizedSwagger -> OperationId -> ValidationResult Source #
Validate a response, from a particular operation id against a Swagger schema