INNER CODE UNIT · Go
transformK8sIntOrStringTypesInObject
argoproj/argo-events · hack/jsonschema/main.go:98
func transformK8sIntOrStringTypesInObject(object obj) {
props, ok := object["properties"].(obj)
if !ok {
format, ok := object["format"].(string)
if ok && format == "int-or-string" {
object["type"] = []string{
"integer",
"string",
}
}
return
}
for _, prop := range props {
transformK8sIntOrStringTypesInObject(prop.(obj))
}
}