Description
The typescript api currently does not support passing a body to a delete request.
DELETE Requests may have a body as per specification.
Generated services for a DELETE Request with a body simply drop the 'body' argument, leading to a wrong request.
openapi-generator version
5.0.0-beta2
Suggest a fix
the templates should be adapted to use httpClient.request instead of httpClient.{{httpMethod}} and pass the {{httpMethod}} as first, and the body as third argument.
Also, looking at the repo it seems that the openapi-generator suggests that DELETE request do not allow for a body by default:
|
public boolean isBodyAllowed() { |
Imo this is very misleading.
Description
The typescript api currently does not support passing a body to a delete request.
DELETE Requests may have a body as per specification.
Generated services for a DELETE Request with a body simply drop the 'body' argument, leading to a wrong request.
openapi-generator version
5.0.0-beta2
Suggest a fix
the templates should be adapted to use
httpClient.requestinstead ofhttpClient.{{httpMethod}}and pass the{{httpMethod}}as first, and the body as third argument.Also, looking at the repo it seems that the openapi-generator suggests that DELETE request do not allow for a body by default:
openapi-generator/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java
Line 203 in ff68128
Imo this is very misleading.