INNER CODE UNIT · Go
gatewayTweaks
kubernetes-sigs/gateway-api · tools/generator/main.go:286
func gatewayTweaks(channel string, name string, jsonProps apiext.JSONSchemaProps) *apiext.JSONSchemaProps {
if strings.Contains(jsonProps.Description, "<gateway:validateIPAddress>") {
jsonProps.Items.Schema.OneOf = []apiext.JSONSchemaProps{{
Properties: map[string]apiext.JSONSchemaProps{
"type": {
Enum: []apiext.JSON{{Raw: []byte("\"IPAddress\"")}},
},
"value": {
AnyOf: []apiext.JSONSchemaProps{{
Format: "ipv4",
}, {
Format: "ipv6",
}},
},
},
}, {
Properties: map[string]apiext.JSONSchemaProps{
"type": {