Merge pull request 'fix swagger handler' (#172) from handler-swagger into v3
Reviewed-on: #172
This commit is contained in:
commit
0e3a199e16
@ -29,6 +29,12 @@ var Handler = func(dst map[string]interface{}, fsys fs.FS) http.HandlerFunc {
|
||||
return
|
||||
}
|
||||
|
||||
if dst == nil {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
_, _ = w.Write(buf)
|
||||
return
|
||||
}
|
||||
|
||||
var src interface{}
|
||||
|
||||
if err = c.Unmarshal(buf, src); err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user