Search code examples
restapiswaggerswagger-uiswagger-editor

Validating HTTP response in swagger


Is it possible to validate an HTTP response in swagger editor and/or swagger ui? I need to check that a particular response has exactly the structure and data i want. For example the body has to be {"message":"pong"}.


Solution

  • Swagger Editor and Swagger UI do not validate API responses against the schema. The corresponding feature request was marked as "nice to have" but "out of scope for the project for now".

    However, since these projects are open source, you could implement this feature yourself and submit a pull request.