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

fix: handle empty response in MSW mocks #1482

Conversation

karlismelderis-mckinsey
Copy link
Contributor

@karlismelderis-mckinsey karlismelderis-mckinsey commented Jun 25, 2024

Status

READY

Description

if response body is empty (aka zero bytes) then Content-Type cannot be application/json as zero bytes cannot be parsed to JSON

@karlismelderis-mckinsey karlismelderis-mckinsey force-pushed the fix/handle-null-in-msw-mock branch from 0017e56 to fa6ac2f Compare June 25, 2024 13:11
@karlismelderis-mckinsey karlismelderis-mckinsey marked this pull request as draft June 25, 2024 13:16
@karlismelderis-mckinsey
Copy link
Contributor Author

karlismelderis-mckinsey commented Jun 25, 2024

Please ignore this PR for now
I might have got it wrong and issues is adding 'Content-Type': 'application/json' to empty response body

@karlismelderis-mckinsey karlismelderis-mckinsey marked this pull request as ready for review June 25, 2024 14:15
@karlismelderis-mckinsey karlismelderis-mckinsey changed the title fix: handle null in MSW mocks fix: handle empty response in MSW mocks Jun 25, 2024
@Maxim-Mazurok
Copy link
Contributor

Hey @melloware , I checked the source only, it makes sense to me, but I don't use orval for MSW. I also didn't check changes to samples. Hope this helps, cheers!

@Maxim-Mazurok Maxim-Mazurok removed their request for review June 26, 2024 00:05
@melloware melloware added this to the 6.32.0 milestone Jun 26, 2024
@melloware melloware merged commit c2fff70 into orval-labs:master Jun 26, 2024
2 checks passed
@melloware melloware added the mock Related to mock generation label Jun 26, 2024
@melloware melloware added the msw MSW related issues label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mock Related to mock generation msw MSW related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants