You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there is no validation error in the standard case but as soon as I have allOf in my schema, there is a validation error. That is inconsistent. The PR that breaks it: Allow undefined required properties #312
In $referenced schemas, the validation does not take effect either.
One of the main reasons why this should urgently be validated (as was in version 0.7.0) is that validators (that use the specification to validate requests/responses) will fail if there is e.g. a typo in one of the entries in required. And now there is no way to detect that.
In general, the OpenAPI/JsonSchema specification is quite relaxed. If only the bare minimum should be validated, this is probably not the only validation that can basically be removed completely.
My take on this:
Best case: Throw validation errors for things that are obvious errors (like specifying a field as required that does not even exist).
Second best option: make it configurable ("strict mode") or filterable (error IDs to exclude, filter levels, ...).
Absolutely necessary minium: make it consistent.
I'd be willing to provide a PR. But since this has been going back and forth I'd like a decision first, where this is going.
The text was updated successfully, but these errors were encountered:
The validation of the
required
keyword does not make sense as it is implemented right now, IMHO.required
that do not exist.allOf
and therefore have properties inrequired
that do not exist, there are already precautions (feat: handle allof when required linked to parent object (#97) #154).allOf
in my schema, there is a validation error. That is inconsistent. The PR that breaks it: Allow undefined required properties #312$ref
erenced schemas, the validation does not take effect either.One of the main reasons why this should urgently be validated (as was in version 0.7.0) is that validators (that use the specification to validate requests/responses) will fail if there is e.g. a typo in one of the entries in
required
. And now there is no way to detect that.In general, the OpenAPI/JsonSchema specification is quite relaxed. If only the bare minimum should be validated, this is probably not the only validation that can basically be removed completely.
My take on this:
I'd be willing to provide a PR. But since this has been going back and forth I'd like a decision first, where this is going.
The text was updated successfully, but these errors were encountered: