Validate Against Swagger Document: Check headers, parameters, content-type and payload

Idea created by mosg on Dec 1, 2016
    Under review
    Score34

    When using the "Validate Against Swagger Document" assertion, the request is not checked against the Swagger definition regarding the following things:

     

    - HTTP Header
    -- The request can contain additional headers not defined in the Swagger document without the assertion failing.
    -- Headers defined as "required" as per the Swagger document can be missing in the request without the assertion failing.

     

    - Parameters
    -- Query parameters can be left out or added arbitrarily although not defined in the Swagger document without the assertion failing.

     

    - Content-Type
    -- "Accept" header and "Content-Type" can be set to values not defined by the Swagger document without the assertion failing.

     

    - Payload
    -- The payload can contain JSON data which is not defined in the Swagger document without the assertion failing.

     

    The assertion should provide an option to support these checks.