Class ConfigurationValidatorConfiguration
java.lang.Object
io.micronaut.jsonschema.configuration.validator.ConfigurationValidatorConfiguration
@ConfigurationProperties("micronaut.jsonschema.configuration.validator")
public final class ConfigurationValidatorConfiguration
extends Object
Runtime configuration for configuration validation support.
All configuration is under the "micronaut.jsonschema.configuration.validator" prefix.
Supported keys:
micronaut.jsonschema.configuration.validator.cachemicronaut.jsonschema.configuration.validator.fail-on-not-presentmicronaut.jsonschema.configuration.validator.suppressionsmicronaut.jsonschema.configuration.validator.endpoint.enabled
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanstatic final booleanstatic final StringConfiguration prefix. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPatterns used to suppress validation errors.booleanisCache()Whether the validation result should be cached.booleanWhether to fail when configuration contains keys not present in schema.voidsetCache(boolean cache) voidsetFailOnNotPresent(boolean failOnNotPresent) voidsetSuppressions(@Nullable List<String> suppressions)
-
Field Details
-
PREFIX
-
DEFAULT_CACHE
public static final boolean DEFAULT_CACHE- See Also:
-
DEFAULT_FAIL_ON_NOT_PRESENT
public static final boolean DEFAULT_FAIL_ON_NOT_PRESENT- See Also:
-
-
Constructor Details
-
ConfigurationValidatorConfiguration
public ConfigurationValidatorConfiguration()
-
-
Method Details
-
isCache
public boolean isCache()Whether the validation result should be cached.When enabled, the first computed validation result is cached and returned for subsequent invocations.
- Returns:
- Whether the validation result should be cached. Default value true
-
setCache
public void setCache(boolean cache) - Parameters:
cache- Whether the validation result should be cached.
-
isFailOnNotPresent
public boolean isFailOnNotPresent()Whether to fail when configuration contains keys not present in schema.Note that some schemas may also enforce this via
additionalProperties: false.- Returns:
- Whether to fail when configuration contains keys not present in schema. Default value true
-
setFailOnNotPresent
public void setFailOnNotPresent(boolean failOnNotPresent) - Parameters:
failOnNotPresent- Whether to fail when configuration contains keys not present in schema
-
getSuppressions
-
setSuppressions
-