-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[BUG][Java][client] Not possible to send payloads on DELETE requests #3719
Labels
Milestone
Comments
6 tasks
My test suite (see #689 (comment)) did not catch this case, probably because of mock-server/mockserver#663 Just using // turn off compliance validation to be able to send payloads with DELETE calls
clientConfig.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true); Is necessary to not have this stacktrace:
// suppress warnings for payloads with DELETE calls:
java.util.logging.Logger.getLogger("org.glassfish.jersey.client").setLevel(java.util.logging.Level.SEVERE); Is necessary to remove
|
jmini
pushed a commit
to jmini/openapi-generator
that referenced
this issue
Aug 21, 2019
jmini
added a commit
to jmini/openapi-generator
that referenced
this issue
Aug 21, 2019
4 tasks
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Bug Report Checklist
Description
I've just hit an issue with Jersey client which doesn't make it possible at all to send payloads with DELETE requests. While the HTTP spec says that semantics of DELETE payload is undefined, there is nothing that strictly prohibits sending payloads with DELETE requests (and I'm actually generating a client for API that needs payloads on DELETE :/ ).
I think this should be allowed in the following way:
Does that sound like a good compromise?
openapi-generator version
4.1.0 (but seems to be problem in all versions AFAICS)
OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
Generate a jersey2 client from OpenAPI spec that defines a json payload on DELETE request, try to run invoke the method for deletion with a non-null payload - no payload is sent.
Related issues/PRs
#3276
Suggest a fix
I'm using the following patch to make this work. If it looks ok, I can submit it as a PR (probably after #3703 is merged, since it touches same parts of code and my patch might need to change depending on the final changes in #3703).
The text was updated successfully, but these errors were encountered: