Skip to content

[BUG] [Typescript] allow body on DELETE #7557

@dartzki

Description

@dartzki
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:

Imo this is very misleading.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions