What is the reason for not failing a validation for an extra query parameter?

Issue #102 resolved
Former user created an issue

Hi, what was the reasoning for not failing a validation if an extra query parameter is supplied that is not defined as part of the swagger document for an endpoint?

Regards, Andrew

Comments (3)

  1. James Navin

    Hi Andrew - thanks for the question.

    The thinking here is that most services will simply ignore query params they don't know/care about, and so sending a request with additional query params doesn't necessarily constitute an invalid request.

    Thinking about it though, I can see a case for wanting to fail validation in tests in this scenario (e.g. your service used to accept a query param but it was accidentally removed during a refactoring and you want to know about that change in your test suite).

    I would be happy to add a check for this case, but would probably make it an INFO level message by default (giving you the option to change it to an ERROR if it was needed).

    Cheers, James

  2. Former user Account Deleted reporter

    Hi James, that would be awesome if you could add a check for that case.

  3. Log in to comment