swagger-codegen
swagger-codegen copied to clipboard
[Java] Do not force the Content-Type if already defined
This won't overwrite the Content-Type if already specified, see #4978.
This allows the client to define the Content-Type of the request without overwriting it. The service definition must declare the following parameter so that a Content-Type can be specified
content-type:
name: Content-Type
in: header
description: Content type
type: string
Missing: Check that the specified Content-Type is listed in the consumes array if not empty.