Skip to content

[BUG][TypeScript Angular] delete operation is broken #11172

Open
@whydoievenneedthis

Description

@whydoievenneedthis
Description

The delete operations are broken. POST, PATCH and PUT supports a body as the second parameter of the call, with the options being at the third position. DELETE, however, requires the body to be put into the second option parameter.

See also:
https://angular.io/api/common/http/HttpClient

openapi-generator version

5.3.1

Generated typescript code
        return this.httpClient.delete<any>(`${this.configuration.basePath}/thingy`,
          null,
            {
                context: localVarHttpContext,
                responseType: <any>responseType_,
                withCredentials: this.configuration.withCredentials,
                headers: localVarHeaders,
                observe: observe,
                reportProgress: reportProgress
            }
        );
Expected typescript code
        return this.httpClient.delete<any>(`${this.configuration.basePath}/thingy`,
            {
                context: localVarHttpContext,
                responseType: <any>responseType_,
                withCredentials: this.configuration.withCredentials,
                headers: localVarHeaders,
                observe: observe,
                reportProgress: reportProgress,
                body: null
            }
        );

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