json/yaml validation for models
Introduced yaml-json-validator-maven-plugin
a. Runs in validate phase
b. For now only validate /import/tosca subfolders
c. Validates both yml and json files
Change-Id: I53513321c4378485dd821c251de5555050313911
Issue-ID: SDC-1343
Signed-off-by: dekstroza <dejan.kitic@ericsson.com>
diff --git a/catalog-dao/pom.xml b/catalog-dao/pom.xml
index 596278e..ccb8085 100644
--- a/catalog-dao/pom.xml
+++ b/catalog-dao/pom.xml
@@ -301,6 +301,35 @@
</lifecycleMappingMetadata>
</configuration>
</plugin>
+ <plugin>
+ <groupId>com.github.sylvainlaurent.maven</groupId>
+ <artifactId>yaml-json-validator-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>validate</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>validate</goal>
+ </goals>
+ <configuration>
+ <validationSets>
+ <validationSet>
+ <includes>
+ <include>src/main/resources/**/*.y*ml</include>
+ <include>src/test/resources/**/*.y*ml</include>
+ </includes>
+ </validationSet>
+ <validationSet>
+ <includes>
+ <include>src/main/resources/**/*.json</include>
+ <include>src/test/resources/**/*.json</include>
+ </includes>
+ </validationSet>
+ </validationSets>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</pluginManagement>
</build>