fix: goctl swagger missing security definition and submit json body data error (#4808)

This commit is contained in:
kesonan
2025-04-25 22:58:45 +08:00
committed by GitHub
parent 44735e949c
commit 812140ba36
8 changed files with 33 additions and 4 deletions

View File

@@ -7,6 +7,15 @@ import (
"google.golang.org/grpc/metadata"
)
func hasKey(properties map[string]string, key string) bool {
if len(properties) == 0 {
return false
}
md := metadata.New(properties)
_, ok := md[key]
return ok
}
func getBoolFromKVOrDefault(properties map[string]string, key string, def bool) bool {
if len(properties) == 0 {
return def