Skip to content

produces "*/*" is converted into Accept: *_/_* #4151

@umbreak

Description

@umbreak
Swagger-codegen version: 2.2.1 (swagger-codegen-maven-plugin)

My yml file contains something like:

      consumes:
        - application/json
      produces:
        - '*/*'

Generating the client code from it works. However, I noticed that the server was crashing when returning the response to the client. After digging for quite some time I realized (with wireshark) that the client was sending the following HTTP Header: "Accept: /"

What is that?

As a workaround I did as follows:

ApiClient apiClient = new ApiClient();
apiClient.addDefaultHeader("Accept", "*");

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions