[Bug]: Raises DeprecationWarning
for deprecated parameters that were not provided
#931
Labels
kind/bug
Indicates an issue
Actual Behavior
If I write an OpenAPI document that specifies a parameter
foo
that’sdeprecated: true
, and use it to validate a request that does not include that parameter, openapi-core still raisesDeprecationWarning: foo parameter is deprecated
for no reason.Expected Behavior
No
DeprecationWarning
should be raised.I don’t think
DeprecationWarning
is appropriate at all here, as aDeprecationWarning
is one that’s “intended for other Python developers” and not for users of a network API. But at the least, it’s obviously inappropriate when the parameter being warned about was not even provided.Steps to Reproduce
Run with
python -Werror
(or in another way that enables warnings, such as development mode):OpenAPI Core Version
0.19.4
OpenAPI Core Integration
none
Affected Area(s)
No response
References
validation
Anything else we need to know?
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: