From b47e839e4ecc77e2caad7855c9869517559dfbaf Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sun, 16 Mar 2025 14:32:49 -0700 Subject: [PATCH] Comment on origin and JSON schema --- .../k8s.io/apimachinery/pkg/util/validation/field/errors.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/staging/src/k8s.io/apimachinery/pkg/util/validation/field/errors.go b/staging/src/k8s.io/apimachinery/pkg/util/validation/field/errors.go index 1bba47e2bf8..840d645ee32 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/validation/field/errors.go +++ b/staging/src/k8s.io/apimachinery/pkg/util/validation/field/errors.go @@ -44,6 +44,9 @@ type Error struct { // - A structured format using "format=" for validation errors related to specific formats // (e.g., "format=dns-label", "format=qualified-name") // + // If the Origin corresponds to an existing declarative validation tag or JSON Schema keyword, + // use that same name for consistency. + // // Origin should be set in the most deeply nested validation function that // can still identify the unique source of the error. Origin string