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

[BUG][scala-http-client] Default body should not be a single space #10560

Closed
4 of 6 tasks
mickaelmagniez opened this issue Oct 8, 2021 · 1 comment · Fixed by #10561
Closed
4 of 6 tasks

[BUG][scala-http-client] Default body should not be a single space #10560

mickaelmagniez opened this issue Oct 8, 2021 · 1 comment · Fixed by #10561

Comments

@mickaelmagniez
Copy link
Contributor

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

The default body sent (for example POST request without any body) is " " (single space character).

Some backends (for example akka-http) failed to parse it as json.

So it will be better so send an empty body rather than just a space.

openapi-generator version

5.2.1

OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix
@chameleon82
Copy link
Contributor

Is that behavior related to scenario when client send header Content-Type: application/json ?

I that case it make sense to not send that header as well as there is no content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants