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:
Emanuele Saccomandi
2022-07-21 06:45:50 +02:00
committed by GitHub
parent cf58ac0583
commit b8524bee23
123 changed files with 76 additions and 10025 deletions

View File

@@ -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);