swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

[Java] Do not force the Content-Type if already defined

Open jdupouy opened this issue 8 years ago • 0 comments

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.

jdupouy avatar Mar 08 '17 13:03 jdupouy