Skip to content
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

Falsey body values are incorrectly failing validation #49

Closed
AlexDobeck opened this issue Feb 21, 2020 · 3 comments
Closed

Falsey body values are incorrectly failing validation #49

AlexDobeck opened this issue Feb 21, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@AlexDobeck
Copy link
Contributor

OpenAPI version
OpenApi 2 and OpenApi 3

Describe the bug
'false' response bodies are failing validation in OpenApi 2 and OpenApi 3.
nullable responses bodies are failing validation in OpenApi 3

To Reproduce
Steps to reproduce boolean failure:

  1. Create a spec with a boolean body response (OpenApi2/OpenApi3)
  2. Attempt to validate a 'false' response
  3. Notice the validation fails

Steps to reproduce nullable failure:

  1. Create a spec with a nullable body response (OpenApi3)
  2. Attempt to validate a null response
  3. Notice the validation fails

Expected behavior
null and false values should be valid response bodies as allowed by the OpenApi specs

@AlexDobeck
Copy link
Contributor Author

I have submitted a PR I believe will resolve this issue:
#50

@rwalle61 rwalle61 mentioned this issue Feb 21, 2020
@rwalle61
Copy link
Collaborator

Released, I'll let you close

@AlexDobeck
Copy link
Contributor Author

Excellent, thanks for the fast turn-around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants