mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 07:42:45 +00:00
Merge remote-tracking branch 'origin/5.3.x' into 6.0.x
This commit is contained in:
@@ -1 +1,5 @@
|
||||
6.0.0-SNAPSHOT
|
||||
<<<<<<< HEAD
|
||||
6.0.0-SNAPSHOT
|
||||
=======
|
||||
5.3.0-SNAPSHOT
|
||||
>>>>>>> origin/5.3.x
|
||||
|
||||
@@ -18,6 +18,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
@@ -359,6 +360,15 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err
|
||||
*s = string(b)
|
||||
return nil
|
||||
}
|
||||
if f, ok := v.(**os.File); ok {
|
||||
*f, err = ioutil.TempFile("", "HttpClientFile")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, err = (*f).Write(b)
|
||||
_, err = (*f).Seek(0, io.SeekStart)
|
||||
return
|
||||
}
|
||||
if xmlCheck.MatchString(contentType) {
|
||||
if err = xml.Unmarshal(b, v); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user