Skip to content

[BUG][typescript-angular] requestBody not sent with http DELETE request #10448

@jbezuk

Description

@jbezuk

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

When generating an API using the "typescript-angular" generator with the following parameters:
--additional-properties ngVersion=11

Using the CLI which outputs version:
tor-cli version 5.3.0-SNAPSHOT

From an OAS 3 yaml file like the attached:

api.txt

The resulting method in the API service does not include the requestBody with the http delete request, like this:

delete.txt

Where the requestBody parameter should be included with the call to this.httpClient.delete.

openapi-generator version

Using the CLI outputs version:
tor-cli version 5.3.0-SNAPSHOT

I do not know if this is a regression.

Steps to reproduce

Place yaml file in working directory.
Run:

docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate \ -i /local/image-management-api.yml \ -g typescript-angular \ -o /local/out/typescript-angular \ --additional-properties ngVersion=11,npmName=my-api,npmVersion=0.1.0

Related issues/PRs

Could not find any open/closed issues similar for the typescript-angular generator.

Suggest a fix

Browsed the source for about an hour, didn't really see where to make a change.

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