Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tejasmehta269 opened this issue May 24, 2021 · 0 comments · Fixed by #9568
Closed

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

tejasmehta269 opened this issue May 24, 2021 · 0 comments · Fixed by #9568

Comments

@tejasmehta269
Copy link

tejasmehta269 commented May 24, 2021

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. #7101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant