fix swagger handler #172

Merged
vtolstov merged 2 commits from handler-swagger into v3 2023-08-14 13:43:51 +03:00
Showing only changes of commit 90b7b7ec1c - Show all commits

View File

@ -29,6 +29,11 @@ var Handler = func(dst map[string]interface{}, fsys fs.FS) http.HandlerFunc {
return return
} }
if dst == nil {
w.WriteHeader(http.StatusOK)
_, _ = w.Write(buf)
}
var src interface{} var src interface{}
if err = c.Unmarshal(buf, src); err != nil { if err = c.Unmarshal(buf, src); err != nil {