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
  • #7319
Closed
Open
Issue created Aug 31, 2020 by Administrator@rootContributor5 of 6 checklist items completed5/6 checklist items

[BUG] Invalid warning about inline schema usage in allOf

Created by: typhoon2k

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Bounty to sponsor the fix (example)
Description

Generator is logging More than one inline schema specified in allOf:. Only the first one is recognized. All others are ignored. warning, when generating Java, C# or TypeScript code from schema that is using allOf without discriminator and with more than 2 referenced schemas.

openapi-generator version

4.3.x, 5.0.0

OpenAPI declaration file content or url

Example file allOf_composition.yaml can be used to repeat this problem (schema SuperMan). We have a use case that has 3 refs (and no inline schemas at all), which leads to the same warning.

Generation Details
    java \
        -jar openapi-generator-cli-5.0.0-beta.jar \
            generate \
            --input-spec $input_file \
            --generator-name typescript-axios \
            --output $output_folder
Steps to reproduce
  1. run generator
  2. check logs
Related issues/PRs

There are issues, which are discussing invalid inheritance/composition support and it seems that all of them are fixed now. In our case generated code is correct (Java/C#/TypeScript) and all fields are there; it's a warning that is wrong.

Suggest a fix

Remove obsolete warning?

Assignee
Assign to
Time tracking