mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-03 14:10:56 +00:00
Merge pull request #4152 from mbohlool/fix_python_client
Select application/json content-type in python generated client, if */* is in the list of content-types
This commit is contained in:
commit
c54797bcef
@ -462,7 +462,7 @@ class ApiClient(object):
|
||||
|
||||
content_types = list(map(lambda x: x.lower(), content_types))
|
||||
|
||||
if 'application/json' in content_types:
|
||||
if 'application/json' in content_types or '*/*' in content_types:
|
||||
return 'application/json'
|
||||
else:
|
||||
return content_types[0]
|
||||
|
@ -462,7 +462,7 @@ class ApiClient(object):
|
||||
|
||||
content_types = list(map(lambda x: x.lower(), content_types))
|
||||
|
||||
if 'application/json' in content_types:
|
||||
if 'application/json' in content_types or '*/*' in content_types:
|
||||
return 'application/json'
|
||||
else:
|
||||
return content_types[0]
|
||||
|
Loading…
x
Reference in New Issue
Block a user