-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Response body is not being validated by OpenAPI schema #123
Comments
Hi @AbdulinRuslan. Currently, responses are not fully matched. It's only checking if any field in the response exists in the schema, but not the other way around. This is because responses can have a lot of variations, especially when using anyOf/oneOf combinations. This might be a feature that will be added in the future, but currently, indeed, is not supported. |
I will close this for now as the functionality is not there at the moment. |
Describe the bug
No errors or warnings appear in case of difference between actual response body and response body described in OpenAPI contract.
To Reproduce
Steps to reproduce the behaviour:
cats --contract=fastapi.json --server=http://127.0.0.1:8000 --httpMethods=GET --fuzzers=HappyPath --urlParams="user_id:2945"
Expected behaviour
Regarding the documentation - https://endava.github.io/cats/docs/getting-started/filtering-reports#ignoring-response-body-checks, the test result should be marked as a warn, not a success.
Environment:
cats info
orjava -jar cats.jar info
:fastapi.json
The text was updated successfully, but these errors were encountered: