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
  • #1167
Closed
Open
Issue created Oct 04, 2018 by Administrator@rootContributor

Using anyOf under responses results in [object] as returnBaseType after generation

Created by: Vik-Git

Description

When making use of anyOf for the response of a get request the returnBaseType becomes the type object. I would have expected it to be either one of the types provided with anyOf or the super component "CookieStationEventType" in my example below.

Is it possible to use anyOf for the responses and still have a returnBaseType (or any different operation property) that provides a more relevant type to use in the template?

openapi-generator version

3.2.3

OpenAPI declaration file content or url

https://gist.github.com/Vik-Git/19636ab72de3a95f766237437836a6ed

Command line used for generation

N/A

Steps to reproduce

Create something simular to the example yaml file provided. Start generation for any language (I used the Spring Codegen)

Related issues/PRs
Suggest a fix/enhancement
Assignee
Assign to
Time tracking