Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions internal/config/validation_errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,11 @@ func MissingRequired(fieldName, serverType, jsonPath, suggestion string) *Valida
}
}

// UnsupportedField creates a ValidationError for unsupported fields
// UnsupportedField creates a ValidationError for unsupported or unrecognized fields.
// Alias for InvalidValue; retained for semantic clarity at call sites where the
// error is about an unexpected field rather than a constraint violation.
func UnsupportedField(fieldName, message, jsonPath, suggestion string) *ValidationError {
return &ValidationError{
Field: fieldName,
Message: message,
JSONPath: jsonPath,
Suggestion: suggestion,
}
return InvalidValue(fieldName, message, jsonPath, suggestion)
}

// AppendConfigDocsFooter appends standard documentation links to an error message
Expand Down
Loading