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
  • #9565
Closed
Open
Issue created May 24, 2021 by Administrator@rootContributor

[BUG] [Java]Specified ContentType header values generates uncompilable code

Created by: tejasmehta269

Description

Error like below. Error:(126,25) java: variable contentType is already defined in method

openapi-generator version 4.1.0, 4.1.3, 5.1.1

OpenAPI declaration file content or url.

  • name: Content-Type in: header description: Replace 'json' with 'xml' if preferred required: true style: simple schema: type: string example: application/json
OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce

Used Maven plugin to re-produce issue. org.openapitools openapi-generator-maven-plugin 5.1.1

Related issues/PRs
Suggest a fix/enhancement

Simillar issue resovled earlier here. https://github.com/OpenAPITools/openapi-generator/pull/7101

Assignee
Assign to
Time tracking