Interface ConfigurationRule
public interface ConfigurationRule
Service Provider Interface (SPI) that allows modules to extend configuration validation with
custom logic that goes beyond JSON Schema keywords.
Implementations are discovered via ServiceLoader.
-
Method Summary
Modifier and TypeMethodDescriptionbooleansupportsPrefix(String prefix) Whether this rule supports the given configuration prefix.validate(ConfigurationValidationContext context) Perform custom validation for a configuration prefix (or a single@EachPropertyentry) and return any additionalConfigurationErrors.
-
Method Details
-
supportsPrefix
Whether this rule supports the given configuration prefix.This is used to avoid executing rules for unrelated prefixes.
- Parameters:
prefix- The prefix being validated- Returns:
- True if this rule should be executed for the prefix
-
validate
Perform custom validation for a configuration prefix (or a single@EachPropertyentry) and return any additionalConfigurationErrors.- Parameters:
context- The validation context- Returns:
- A set of additional validation errors/warnings (may be empty)
-