forked from loafle/openapi-generator-original
Add support for string response deserialization (#12910)
* Add support for string response deserialization * updated samples * updated samples * realigned to master * fix: errors were not getting thrown * updated samples * fix: errors were not getting thrown * updated samples
This commit is contained in:
committed by
GitHub
parent
cf58ac0583
commit
b8524bee23
@@ -497,6 +497,10 @@ namespace Org.OpenAPITools.Client
|
||||
{
|
||||
response.Data = (T)(object)response.RawBytes;
|
||||
}
|
||||
else if (typeof(T).Name == "String") // for string response
|
||||
{
|
||||
response.Data = (T)(object)response.Content;
|
||||
}
|
||||
|
||||
InterceptResponse(req, response);
|
||||
|
||||
@@ -581,7 +585,11 @@ namespace Org.OpenAPITools.Client
|
||||
{
|
||||
response.Data = (T)(object)response.RawBytes;
|
||||
}
|
||||
|
||||
else if (typeof(T).Name == "String") // for string response
|
||||
{
|
||||
response.Data = (T)(object)response.Content;
|
||||
}
|
||||
|
||||
InterceptResponse(req, response);
|
||||
|
||||
var result = ToApiResponse(response);
|
||||
|
||||
Reference in New Issue
Block a user