mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-18 22:17:05 +00:00
[Python][Client] Allow all content-types with text/ prefix (#19802)
* ODM-12108: allow all content-types with text/ prefix * ODM-12108: Update deserialization tests --------- Co-authored-by: Oleg Kunitsyn <you@example.com>
This commit is contained in:
@@ -412,7 +412,7 @@ class ApiClient:
|
||||
data = ""
|
||||
else:
|
||||
data = json.loads(response_text)
|
||||
elif re.match(r'^text/plain\s*(;|$)', content_type, re.IGNORECASE):
|
||||
elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE):
|
||||
data = response_text
|
||||
else:
|
||||
raise ApiException(
|
||||
|
||||
Reference in New Issue
Block a user