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

Validate no-content responses #591

Merged

Conversation

lyndoh
Copy link
Contributor

@lyndoh lyndoh commented Apr 28, 2021

Fail validation if the api spec specifiies that a response should be empty, but the implementation has returned a body.

Includes test to cover this scenario as well as minor change to 204 'No content' using 'json()' instead of 'send()' to improve code coverage rather than simply bypassing the validation

Copy link
Owner

@cdimascio cdimascio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lyndoh looks good. thanks for the fix

@cdimascio cdimascio merged commit 98de680 into cdimascio:master May 3, 2021
@cdimascio
Copy link
Owner

@all-contributors @lyndoh for code and test

@allcontributors
Copy link
Contributor

@cdimascio

I could not determine your intention.

Basic usage: @all-contributors please add @Someone for code, doc and infra

For other usages see the documentation

@cdimascio
Copy link
Owner

@all-contributors add @lyndoh for code and test

@allcontributors
Copy link
Contributor

@cdimascio

I've put up a pull request to add @lyndoh! 🎉

@lyndoh lyndoh deleted the feat/validate-no-content-response branch May 3, 2021 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants