OpenAPITools / OpenAPITools/openapi-generator
[BUG][TypeScript Angular] delete operation is broken
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
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
}
);
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Use the reported generated TypeScript Angular delete call as the reproduction and read the Angular HttpClient.delete signature linked in the issue. Inspect the TypeScript Angular generator entry point that emits this call, then verify that generated DELETE requests place options, including the body, in the expected argument position.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100