Skip to content

Commit

Permalink
[Java Jersey] Update ApiClient.mustache Jersey doesn't allow entities…
Browse files Browse the repository at this point in the history
… in method DELETE (#19530)

* Update ApiClient.mustache

* Update ApiClient.mustache

Jersey doesn't allow request entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* jersey ApiClient.mustache invoke DELETE without entity if empty

* jersey ApiClient.mustache invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty
  • Loading branch information
eric-rolli authored Sep 16, 2024
1 parent cf9de0b commit bbafeae
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,11 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
} else if ("PUT".equals(method)) {
response = invocationBuilder.put(entity);
} else if ("DELETE".equals(method)) {
response = invocationBuilder.method("DELETE", entity);
if ("".equals(entity.getEntity())) {
response = invocationBuilder.method("DELETE");
} else {
response = invocationBuilder.method("DELETE", entity);
}
} else if ("PATCH".equals(method)) {
response = invocationBuilder.method("PATCH", entity);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,11 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
} else if ("PUT".equals(method)) {
response = invocationBuilder.put(entity);
} else if ("DELETE".equals(method)) {
response = invocationBuilder.method("DELETE", entity);
if ("".equals(entity.getEntity())) {
response = invocationBuilder.method("DELETE");
} else {
response = invocationBuilder.method("DELETE", entity);
}
} else if ("PATCH".equals(method)) {
response = invocationBuilder.method("PATCH", entity);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,11 @@ private Response sendRequest(String method, Invocation.Builder invocationBuilder
} else if ("PUT".equals(method)) {
response = invocationBuilder.put(entity);
} else if ("DELETE".equals(method)) {
response = invocationBuilder.method("DELETE", entity);
if ("".equals(entity.getEntity())) {
response = invocationBuilder.method("DELETE");
} else {
response = invocationBuilder.method("DELETE", entity);
}
} else if ("PATCH".equals(method)) {
response = invocationBuilder.method("PATCH", entity);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,11 @@ private Response sendRequest(String method, Invocation.Builder invocationBuilder
} else if ("PUT".equals(method)) {
response = invocationBuilder.put(entity);
} else if ("DELETE".equals(method)) {
response = invocationBuilder.method("DELETE", entity);
if ("".equals(entity.getEntity())) {
response = invocationBuilder.method("DELETE");
} else {
response = invocationBuilder.method("DELETE", entity);
}
} else if ("PATCH".equals(method)) {
response = invocationBuilder.method("PATCH", entity);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,11 @@ private Response sendRequest(String method, Invocation.Builder invocationBuilder
} else if ("PUT".equals(method)) {
response = invocationBuilder.put(entity);
} else if ("DELETE".equals(method)) {
response = invocationBuilder.method("DELETE", entity);
if ("".equals(entity.getEntity())) {
response = invocationBuilder.method("DELETE");
} else {
response = invocationBuilder.method("DELETE", entity);
}
} else if ("PATCH".equals(method)) {
response = invocationBuilder.method("PATCH", entity);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,11 @@ private Response sendRequest(String method, Invocation.Builder invocationBuilder
} else if ("PUT".equals(method)) {
response = invocationBuilder.put(entity);
} else if ("DELETE".equals(method)) {
response = invocationBuilder.method("DELETE", entity);
if ("".equals(entity.getEntity())) {
response = invocationBuilder.method("DELETE");
} else {
response = invocationBuilder.method("DELETE", entity);
}
} else if ("PATCH".equals(method)) {
response = invocationBuilder.method("PATCH", entity);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,11 @@ private Response sendRequest(String method, Invocation.Builder invocationBuilder
} else if ("PUT".equals(method)) {
response = invocationBuilder.put(entity);
} else if ("DELETE".equals(method)) {
response = invocationBuilder.method("DELETE", entity);
if ("".equals(entity.getEntity())) {
response = invocationBuilder.method("DELETE");
} else {
response = invocationBuilder.method("DELETE", entity);
}
} else if ("PATCH".equals(method)) {
response = invocationBuilder.method("PATCH", entity);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,11 @@ private Response sendRequest(String method, Invocation.Builder invocationBuilder
} else if ("PUT".equals(method)) {
response = invocationBuilder.put(entity);
} else if ("DELETE".equals(method)) {
response = invocationBuilder.method("DELETE", entity);
if ("".equals(entity.getEntity())) {
response = invocationBuilder.method("DELETE");
} else {
response = invocationBuilder.method("DELETE", entity);
}
} else if ("PATCH".equals(method)) {
response = invocationBuilder.method("PATCH", entity);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,11 @@ private Response sendRequest(String method, Invocation.Builder invocationBuilder
} else if ("PUT".equals(method)) {
response = invocationBuilder.put(entity);
} else if ("DELETE".equals(method)) {
response = invocationBuilder.method("DELETE", entity);
if ("".equals(entity.getEntity())) {
response = invocationBuilder.method("DELETE");
} else {
response = invocationBuilder.method("DELETE", entity);
}
} else if ("PATCH".equals(method)) {
response = invocationBuilder.method("PATCH", entity);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,11 @@ private Response sendRequest(String method, Invocation.Builder invocationBuilder
} else if ("PUT".equals(method)) {
response = invocationBuilder.put(entity);
} else if ("DELETE".equals(method)) {
response = invocationBuilder.method("DELETE", entity);
if ("".equals(entity.getEntity())) {
response = invocationBuilder.method("DELETE");
} else {
response = invocationBuilder.method("DELETE", entity);
}
} else if ("PATCH".equals(method)) {
response = invocationBuilder.method("PATCH", entity);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,11 @@ private Response sendRequest(String method, Invocation.Builder invocationBuilder
} else if ("PUT".equals(method)) {
response = invocationBuilder.put(entity);
} else if ("DELETE".equals(method)) {
response = invocationBuilder.method("DELETE", entity);
if ("".equals(entity.getEntity())) {
response = invocationBuilder.method("DELETE");
} else {
response = invocationBuilder.method("DELETE", entity);
}
} else if ("PATCH".equals(method)) {
response = invocationBuilder.method("PATCH", entity);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,11 @@ private Response sendRequest(String method, Invocation.Builder invocationBuilder
} else if ("PUT".equals(method)) {
response = invocationBuilder.put(entity);
} else if ("DELETE".equals(method)) {
response = invocationBuilder.method("DELETE", entity);
if ("".equals(entity.getEntity())) {
response = invocationBuilder.method("DELETE");
} else {
response = invocationBuilder.method("DELETE", entity);
}
} else if ("PATCH".equals(method)) {
response = invocationBuilder.method("PATCH", entity);
} else {
Expand Down

0 comments on commit bbafeae

Please sign in to comment.