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
  • #252
Closed
Open
Issue created Jun 08, 2018 by Jim Schubert@jimschubertContributor

ModelUtils.getUnusedSchemas reports simple model from array types as unused

Description

Found in #251

openapi-generator version

3.0.0

OpenAPI declaration file content or url

https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v3.0/petstore.yaml

Command line used for generation

n/a (not a generation bug)

Steps to reproduce

Discovered while testing #251.

On that branch:

mvn clean install
cd modules/openapi-generator-gradle-plugin/
./gradlew assemble publishToMavenLocal
./gradlew --build-file=samples/local-spec/build.gradle generateGoWithInvalidSpec
Related issues/PRs
  • #251
Suggest a fix/enhancement

ModelUtils.getUnusedSchemas calls into visitOpenAPI, and visitOpenAPI needs to account for multiple levels of nested arrays, enums, map structures, and polymorphic types.

Assignee
Assign to
Time tracking