This PR will allow the generated Go code to support a scenario where the decoding of a JSON response body is bypassed with the response body being returned in the DetailedResponse.Result field as an io.ReadCloser instance.
To do this, the generated code would pass in the result of new(io.ReadCloser) instead of new(Foo) for the deserialization target result object (where Foo represents a model object).
This PR will allow the generated Go code to support a scenario where the decoding of a JSON response body is bypassed with the response body being returned in the DetailedResponse.Result field as an io.ReadCloser instance. To do this, the generated code would pass in the result of
new(io.ReadCloser)
instead ofnew(Foo)
for the deserialization target result object (where Foo represents a model object).