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
  • #1085
Closed
Open
Issue created Sep 22, 2018 by Administrator@rootContributor

JAVA-SPRING model generation: disable swagger annotations import

Created by: esoni88

Description

Hi i m using java spring generator and i did not find an option to disable the import of import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; inside my model code generated. Checking the source code openapi-generator-3.2.3\modules\openapi-generator\src\main\resources\JavaSpring\model.mustache i found that the ApiModel and ApiModelProperty are imported with mustache instructions

{{#imports}}import {{import}}; {{/imports}}

So i cant customize the mustache to disable it because {{import}} contains other useful import.

openapi-generator version

3.2.3

OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
Assignee
Assign to
Time tracking