swagger-test-0.2.2: Testing of Swagger APIs

Copyright(c) Rodrigo Setti 2017
LicenseBSD3
Maintainerrodrigosetti@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Test.Swagger.Validate

Description

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)

Synopsis

Documentation

parseResponse :: ByteString -> Either String HttpResponse Source #

Parse a HttpResponse from ByteString

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