Fix validation for Body without $ref#185
Conversation
|
Any input on what needs to be done here? We'd love to integrate flex for validation of requests, but this is kind of a showstopper as it would need adapting all existing swagger schemas and keeping the workaround of defining everything via $ref in mind. Would be glad to assist. |
|
@mkraemer67 or @danopz tests are failing: https://travis-ci.org/pipermerriam/flex/jobs/305887945 Please get CI green and I can review this and get it merged. |
| for key, value in schema_validators.items(): | ||
| validators.setdefault(key, value) | ||
| if key in validators: | ||
| validators[key] += value |
There was a problem hiding this comment.
I'm having trouble following the logic behind this change which implies this section could use a comment explaining what is happening and why. Is that something you can add?
|
Added a comment trying to explain the merge of validators. |
This fixes the bug where required is not validated.
But fixing it this way leads test_local_parameter_values_override_schema to fail. I don't really get what this test is about, since the definition doesn't seem to be right?
Fixes #138