-
Notifications
You must be signed in to change notification settings - Fork 76
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
Required parameter in body not validated without $ref #138
Comments
danopz
added a commit
to danopz/flex
that referenced
this issue
Nov 21, 2017
danopz
added a commit
to danopz/flex
that referenced
this issue
Dec 6, 2017
danopz
added a commit
to danopz/flex
that referenced
this issue
Feb 22, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Required Body parameters are not validated for their existence if they are not defined by $ref.
Given the following swagger.yml file:
If I POST an empty String with Content-Type: application/json it correctly validates as "Got value
''
of typestring
. Value must be of type(s):('object',)
".But now when I POST an empty JSON object it will validate as true.
Validation works if I POST an Integer for the foo param: "Got value
1
of typeinteger
. Value must be of type(s):('string',)
"If one define the body schema via $ref in definitions everything works fine, missing parameters are validated.
For validation I am using a populated Flex Request and flex.core.validate_api_request.
The text was updated successfully, but these errors were encountered: