Class JsonSchemaConfigurationValidator
java.lang.Object
io.micronaut.jsonschema.configuration.validator.cli.JsonSchemaConfigurationValidator
CLI-oriented facade that constructs a classloader and environment and delegates to
ConfigurationJsonSchemaValidator.-
Constructor Summary
ConstructorsConstructorDescriptionJsonSchemaConfigurationValidator(List<URL> classpath, List<String> environments, boolean deduceEnvironment, ConfigurationJsonSchemaValidator validator) -
Method Summary
Modifier and TypeMethodDescriptionforClasspath(String classpath, List<String> environments, boolean deduceEnvironment, ConfigurationJsonSchemaValidator validator) forClasspath(String classpath, List<String> environments, ConfigurationJsonSchemaValidator validator) validate()Validate the configuration found on the configured classpath.validateAndReport(ConfigurationErrorReporter reporter) Validate and report using the given reporter.
-
Constructor Details
-
JsonSchemaConfigurationValidator
public JsonSchemaConfigurationValidator(List<URL> classpath, List<String> environments, boolean deduceEnvironment, ConfigurationJsonSchemaValidator validator) - Parameters:
classpath- The classpath to use to discover configuration schemasenvironments- The environments to enablededuceEnvironment- Whether to deduce environmentsvalidator- The validator
-
-
Method Details
-
forClasspath
public static JsonSchemaConfigurationValidator forClasspath(String classpath, List<String> environments, boolean deduceEnvironment, ConfigurationJsonSchemaValidator validator) -
forClasspath
public static JsonSchemaConfigurationValidator forClasspath(String classpath, List<String> environments, ConfigurationJsonSchemaValidator validator) -
validate
Validate the configuration found on the configured classpath.- Returns:
- A set of validation errors/warnings (empty if valid)
- Throws:
IOException- If validation fails
-
validateAndReport
public Set<ConfigurationError> validateAndReport(ConfigurationErrorReporter reporter) throws IOException Validate and report using the given reporter.- Parameters:
reporter- The reporter- Returns:
- The validation errors/warnings
- Throws:
IOException- If validation or reporting fails
-