mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-05-04 14:48:30 +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,7 +512,12 @@ func fillContent(reqResp reqResp, respContent openapi.Content, ctype string, sam
|
||||
}
|
||||
|
||||
if content.Example == nil && len(exampleMsg) > len(content.Example) {
|
||||
content.Example = exampleMsg
|
||||
_, disableOasExample := os.LookupEnv("MIZU_DEBUG_DISABLE_OAS_EXAMPLE")
|
||||
if disableOasExample {
|
||||
content.Example = nil
|
||||
} else {
|
||||
content.Example = exampleMsg
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user