mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-02 21:21:02 +00:00
tmp: Disable saving OAS example responses if env var is set
This commit is contained in:
parent
4c0aeb8146
commit
a30578c140
@ -9,6 +9,7 @@ import (
|
||||
"mime/multipart"
|
||||
"net/textproto"
|
||||
"net/url"
|
||||
"os"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -511,9 +512,14 @@ func fillContent(reqResp reqResp, respContent openapi.Content, ctype string, sam
|
||||
}
|
||||
|
||||
if content.Example == nil && len(exampleMsg) > len(content.Example) {
|
||||
_, disableOasExample := os.LookupEnv("MIZU_DEBUG_DISABLE_OAS_EXAMPLE")
|
||||
if disableOasExample {
|
||||
content.Example = nil
|
||||
} else {
|
||||
content.Example = exampleMsg
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return respContent[ctype], nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user