Skip to content

[BUG] [typescript-fetch] Imports are absent for oneof field with discriminator #21441

@b0g3r

Description

@b0g3r

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator?
  • 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

For fields with oneOf and discriminator, generator generates code without imports and with a few missing returns.

openapi-generator version

7.13

OpenAPI declaration file content or url

https://gist.github.com/b0g3r/4610d89d3a06e99792a9f6f7747d5504

Generation Details
Steps to reproduce

Generate client for typescrip-fetch on the openapi.json. In the model file it will be no imports and return json is used instead of return value.

Related issues/PRs

Introduced in #21057 and #20983

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