[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