Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #10975
Closed
Open
Issue created Nov 27, 2021 by Administrator@rootContributor4 of 6 checklist items completed4/6 checklist items

[BUG] Broken delete request body in typescript-angular generator

Created by: cghislai

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 porting typescript-angular client to angular13, i noticed a support for a delete body parameters that did not match the angular doumentation. Indeed, it produces uncompilable code.

In the openapi v3 spec (https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#requestBodyObject), it is mentionned The requestBody is only supported in HTTP methods where the HTTP 1.1 specification RFC7231 has explicitly defined semantics for request bodies.. In RFC7231 (https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.5), it is mentioned A payload within a DELETE request message has no defined semantics. In the test petstore specification file, adding a request in a delete method produces an invalid spec rejected by the generators.

openapi-generator version

master

OpenAPI declaration file content or url

petstore.yaml

Generation Details
Steps to reproduce
  • clone master
  • update the typescript angular v12 config to use angular version >12.1 (in order to trigger the deleteSupportsBody code branch)
  • generate sample clients
  • try to compile the generated angular 12 client
Related issues/PRs

see https://github.com/OpenAPITools/openapi-generator/pull/10976

see also https://github.com/OpenAPITools/openapi-generator/pull/10877

Suggest a fix

revert support for body in delete

Assignee
Assign to
Time tracking