Interface ConfigurationValidationExtension

All Known Implementing Classes:
DefaultConfigurationValidationExtension

public interface ConfigurationValidationExtension
Configuration extension for the io.micronaut.configuration.validation plugin.

This plugin validates Micronaut configuration (typically application.yml, application.properties, etc.) against JSON Schemas published by Micronaut modules and generated from @ConfigurationProperties.

Validation is executed via the io.micronaut.jsonschema.configuration.validator.cli.ConfigurationJsonSchemaValidatorCliBootstrap entry point from the micronaut-json-schema-configuration-validator module.

Since:
5.0.0
  • Method Details

    • getVersion

      org.gradle.api.provider.Property<String> getVersion()
      Version of micronaut-json-schema-configuration-validator used by the validation tasks.
      Returns:
      the validator version
    • getEnabled

      org.gradle.api.provider.Property<Boolean> getEnabled()
      Enables or disables configuration validation globally.
      Returns:
      global enabled flag
    • getOutputDirectory

      org.gradle.api.file.DirectoryProperty getOutputDirectory()
      Base output directory for generated validation reports.

      Scenario tasks will write into a scenario subdirectory.

      Returns:
      the base output directory
    • getFailOnNotPresent

      org.gradle.api.provider.Property<Boolean> getFailOnNotPresent()
      Whether unknown configuration properties should be considered errors.

      Maps to --fail-on-not-present.

      Returns:
      fail-on-not-present flag
    • getDeduceEnvironments

      org.gradle.api.provider.Property<Boolean> getDeduceEnvironments()
      Whether Micronaut environments should be deduced.

      Maps to --deduce-environments.

      Returns:
      deduce-environments flag
    • getValidateDependencyInjection

      org.gradle.api.provider.Property<Boolean> getValidateDependencyInjection()
      Whether dependency injection should be validated.

      Maps to --validate-dependency-injection.

      Returns:
      validate-dependency-injection flag
    • getFormat

      org.gradle.api.provider.Property<String> getFormat()
      Report format.

      Valid values are json, html, and both. Maps to --format.

      Returns:
      report format
    • getSuppressions

      org.gradle.api.provider.ListProperty<String> getSuppressions()
      Suppression patterns.

      Each pattern maps to --suppress.

      Returns:
      suppression patterns
    • getSuppressedInjectionErrors

      org.gradle.api.provider.ListProperty<String> getSuppressedInjectionErrors()
      Dependency injection suppression patterns.

      Each pattern is a fully qualified class name or *-wildcard pattern, passed to the validator CLI via --suppress-inject-errors <csv>.

      Returns:
      dependency injection suppression patterns
    • getProjectBaseDir

      org.gradle.api.file.DirectoryProperty getProjectBaseDir()
      Project base directory used for origin path rewriting in console output.

      Maps to --project-base-dir.

      Returns:
      project base directory
    • getJavaLauncher

      org.gradle.api.provider.Property<org.gradle.jvm.toolchain.JavaLauncher> getJavaLauncher()
      Optional Java launcher used to execute the validator CLI.
      Returns:
      Java launcher
    • getJavaExecutable

      org.gradle.api.provider.Property<String> getJavaExecutable()
      Optional explicit Java executable path used to execute the validator CLI.
      Returns:
      Java executable
    • getRun

      Scenario used for run.
      Returns:
      run scenario configuration
    • getTest

      Scenario used for test.
      Returns:
      test scenario configuration
    • getProduction

      Scenario used for packaging/build validation.
      Returns:
      production scenario configuration