Skip to content

[BUG] [typescript-fetch] Incorrect parsing with additional properties #20195

Closed
@ArshadRao

Description

@ArshadRao

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?
Description

The typescript-fetch generator doesn't parse the request object correctly when the content type is multipart/form-data and object has additional properties.

openapi-generator version

openapi-generator version 7.10.0

https://gist.github.com/ArshadRao/9ecbfbbb14c09927e0b078fd32e0dfcb

generated output

image

Issue in the generation

Generating unexpected typescript code to parse the request parameters on line 87, resulting in error for the whole file.

Generation Details

{ "withInterfaces": true, "enumPropertyNaming": "original" }

Steps to reproduce

openapi-generator-cli generate -i ./swagger.json -g typescript-fetch

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