Open IvanStawski opened 3 years ago
Thanks @IvanStawski, what validation error does our plugin currently give when the response object contains additional properties to those described in the OpenAPI response schema?
Have you definitely specified additionalProperties: false
in your OpenAPI spec?
additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema. Consistent with JSON Schema, additionalProperties defaults to true.
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#schema-object
Thanks @IvanStawski, what validation error does our plugin currently give when the response object contains additional properties to those described in the OpenAPI response schema?
- Example of the current validation error given in the current version: https://prnt.sc/vuz8cw. There is no any mention of what field was actually appeared in the response
Have you definitely specified
additionalProperties: false
in your OpenAPI spec?
- Yes, exactly. this is the case. When such unclear validation error appears
Ah thanks @IvanStawski, sorry, I understand now that you'd like the assertion message from a definition using additionalProperties: false
to be clearer.
If you'd like to help resolve this, please recreate an example using the bugRecreationTemplate. (I assume you'd like throw
to throw an error like https://prnt.sc/viqtti)
please recreate an example using the bugRecreationTemplate
Please clarify: How should I provide an example? Should I make a PR or something else?
Yea please fork this repo and make a branch recreating this scenario in the bugRecreation template (i.e. write a test where we fail to output the assertion error you'd like). Link it here, then someone (or yourself if you want) can make the test pass. I'm happy to guide them on how to implement the change to our code.
Thanks!
To Simplify test analisys with
Does it make sense?