update the grpc field name for consistency

This commit is contained in:
Sergey Kanzhelev
2021-12-01 18:16:08 +00:00
parent 108c284a33
commit 1918ecad04
2 changed files with 3 additions and 3 deletions

View File

@@ -2882,10 +2882,10 @@ func validateHandler(handler commonHandler, fldPath *field.Path) field.ErrorList
}
if handler.GRPC != nil {
if numHandlers > 0 {
allErrors = append(allErrors, field.Forbidden(fldPath.Child("gRPC"), "may not specify more than 1 handler type"))
allErrors = append(allErrors, field.Forbidden(fldPath.Child("grpc"), "may not specify more than 1 handler type"))
} else {
numHandlers++
allErrors = append(allErrors, validateGRPCAction(handler.GRPC, fldPath.Child("gRPC"))...)
allErrors = append(allErrors, validateGRPCAction(handler.GRPC, fldPath.Child("grpc"))...)
}
}
if numHandlers == 0 {