// validateStructuralCompleteness checks that all value validations in s have // a structural counterpart so that every value validation applies to a value // with a known schema: // - validations for specific properties must have that property (or additionalProperties under an option) structurally defined // - additionalProperties validations must have additionalProperties defined in the structural portion of the schema corresponding to that node // - Items validations must have also have a corresponding items structurally // // The "structural" portion of the schema refers to all nodes in the // schema traversible without following any NestedValueValidations. func validateStructuralCompleteness(s *Structural, fldPath *field.Path, opts ValidationOptions) field.ErrorList { … } func validateValueValidationCompleteness(v *ValueValidation, s *Structural, sPath, vPath *field.Path, opts ValidationOptions) field.ErrorList { … } func validateNestedValueValidationCompleteness(v *NestedValueValidation, s *Structural, sPath, vPath *field.Path, opts ValidationOptions) field.ErrorList { … }