forked from loafle/openapi-generator-original
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))
|
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'
|
return 'application/json'
|
||||||
else:
|
else:
|
||||||
return content_types[0]
|
return content_types[0]
|
||||||
|
@ -462,7 +462,7 @@ class ApiClient(object):
|
|||||||
|
|
||||||
content_types = list(map(lambda x: x.lower(), content_types))
|
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'
|
return 'application/json'
|
||||||
else:
|
else:
|
||||||
return content_types[0]
|
return content_types[0]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user