diff options
3 files changed, 9 insertions, 3 deletions
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/validation/VersionValidator.java b/aai-schema-ingest/src/main/java/org/onap/aai/validation/VersionValidator.java index 375bec0f..a1e95557 100644 --- a/aai-schema-ingest/src/main/java/org/onap/aai/validation/VersionValidator.java +++ b/aai-schema-ingest/src/main/java/org/onap/aai/validation/VersionValidator.java @@ -1,4 +1,4 @@ -/** +/** * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ @@ -21,6 +21,7 @@ package org.onap.aai.validation; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.stereotype.Component; /** @@ -28,6 +29,7 @@ import org.springframework.stereotype.Component; * all required versions */ @Component +@ConditionalOnProperty(name = "schema.translator.list", havingValue = "config", matchIfMissing = true) public class VersionValidator { private SchemaErrorStrategy strat; private VersionValidationModule verMod; diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/validation/edges/EdgeRuleValidator.java b/aai-schema-ingest/src/main/java/org/onap/aai/validation/edges/EdgeRuleValidator.java index 4eedaa07..620bc726 100644 --- a/aai-schema-ingest/src/main/java/org/onap/aai/validation/edges/EdgeRuleValidator.java +++ b/aai-schema-ingest/src/main/java/org/onap/aai/validation/edges/EdgeRuleValidator.java @@ -1,4 +1,4 @@ -/** +/** * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ @@ -31,12 +31,14 @@ import org.onap.aai.setup.ConfigTranslator; import org.onap.aai.setup.SchemaVersion; import org.onap.aai.validation.SchemaErrorStrategy; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.stereotype.Component; /** * Runs all validations against the ingested schema */ @Component +@ConditionalOnProperty(name = "schema.translator.list", havingValue = "config", matchIfMissing = true) public class EdgeRuleValidator { private Map<SchemaVersion, List<DocumentContext>> versionJsonFilesMap; private final SchemaErrorStrategy strat; diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/validation/nodes/NodeValidator.java b/aai-schema-ingest/src/main/java/org/onap/aai/validation/nodes/NodeValidator.java index ac9ecbdd..13de6715 100644 --- a/aai-schema-ingest/src/main/java/org/onap/aai/validation/nodes/NodeValidator.java +++ b/aai-schema-ingest/src/main/java/org/onap/aai/validation/nodes/NodeValidator.java @@ -1,4 +1,4 @@ -/** +/** * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ @@ -27,9 +27,11 @@ import org.onap.aai.setup.ConfigTranslator; import org.onap.aai.setup.SchemaVersion; import org.onap.aai.validation.SchemaErrorStrategy; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.stereotype.Component; @Component +@ConditionalOnProperty(name = "schema.translator.list", havingValue = "config", matchIfMissing = true) public class NodeValidator { private ConfigTranslator translator; |