mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-06 21:06:10 +00:00
fix null payload in java jersey2 (#6933)
This commit is contained in:
@@ -791,9 +791,9 @@ public class ApiClient {
|
||||
} else {
|
||||
// We let jersey handle the serialization
|
||||
if (isBodyNullable) { // payload is nullable
|
||||
entity = Entity.entity(obj == null ? Entity.text("null") : obj, contentType);
|
||||
entity = Entity.entity(obj == null ? "null" : obj, contentType);
|
||||
} else {
|
||||
entity = Entity.entity(obj == null ? Entity.text("") : obj, contentType);
|
||||
entity = Entity.entity(obj == null ? "" : obj, contentType);
|
||||
}
|
||||
}
|
||||
return entity;
|
||||
|
||||
Reference in New Issue
Block a user