-
-
Notifications
You must be signed in to change notification settings - Fork 68
writeOnly with default doesn't work in 0.6.0 #253
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
Comments
I think I'm experiencing the same thing with I'm having trouble following the code -- this library is the most sophisticated user of
Is it reasonable to make it possible to opt-out of this check? I can imagine other cases in which someone wants to specify a default of |
I believe the issue is in default value validation that we shouldn't consider other keywords, including writeonly/readonly. Based on OpenAPI 3.0, schema type should be the only keyword to be considered here.
|
The issue should be fixed with openapi-schema-validator 0.6.2 |
Good day! I use OpenAPI 3.0.0 schema and it stopped working with properties that have
writeOnly
anddefault
at the same time.A simple code snippet:
The error:
As I understood the root cause is here python-openapi/openapi-schema-validator#85
As a workaround, I made a custom validator that uses
OAS30WriteValidator
:Shouldn't it be replaced in
openapi-spec-validator
?The text was updated successfully, but these errors were encountered: