Skip to content

Conversation

@mbohlool
Copy link
Contributor

@mbohlool mbohlool commented Nov 7, 2016

PR checklist

  • Read the contribution guildelines.
  • Ran the shell/batch script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)
  • Filed the PR against the correct branch: master for non-breaking changes and 2.3.0 branch for breaking (non-backward compatible) changes.

Description of the PR

select_header_content_type in generated python client's api_client prefers application/json if it is in the list of content types. But the list may content / that means server accepts any content-type. In that case we should still prefer application/json content type.

@wing328 wing328 added this to the v2.2.2 milestone Nov 8, 2016
@wing328 wing328 merged commit c54797b into swagger-api:master Nov 8, 2016
@wing328
Copy link
Contributor

wing328 commented Nov 8, 2016

@mbohlool thanks for the PR, which has been merged into master.

@wing328 wing328 changed the title Select application/json content-type in python generated client, if */* is in the list of content-types [Python] Select application/json content-type in python generated client, if */* is in the list of content-types Feb 20, 2017
davidgri pushed a commit to davidgri/swagger-codegen that referenced this pull request May 11, 2017
Select application/json content-type in python generated client, if */* is in the list of content-types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants