CATS is a REST API Fuzzer and negative testing tool for OpenAPI endpoints. CATS automatically generates, runs and reports tests with minimum configuration and no coding effort. Tests are self-healing and do not require maintenance.
Describe the bug
If a nullable enum is described in the OPEN API response like described here, there is a warning from cats (Response does NOT match expected result. Response code [201] is documented, but response body does NOT matches the corresponding schema.)
To Reproduce
For an attribute described as nullable enum like that :
If the API tested returns null you have the warning
Expected behaviour
It should be a success
Environment:
Key | Value
------------- | --------------------
OS Name | Mac OS X
OS Version | 12.6.2
OS Arch | x86_64
Binary Type | uber-jar
Cats Version | 10.5.0
Cats Build | 2024-02-05T08:10:13Z
Term Width | 153
Term Type | xterm-256color
Shell | /usr/local/bin/zsh
Additional context
Removing the null value from the enum removes the warning
e.g :
Describe the bug If a nullable enum is described in the OPEN API response like described here, there is a warning from cats (
Response does NOT match expected result. Response code [201] is documented, but response body does NOT matches the corresponding schema.
)To Reproduce For an attribute described as nullable enum like that :
If the API tested returns
null
you have the warningExpected behaviour It should be a success
Environment:
Additional context Removing the
null
value from the enum removes the warning e.g :But in the linked description from Swagger, it says to add the
null
value for a nullable enum.Thank you