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/security-utils/pom.xml b/security-utils/pom.xml
index c0361ed..a0df703 100644
--- a/security-utils/pom.xml
+++ b/security-utils/pom.xml
@@ -61,6 +61,35 @@
</execution>
</executions>
</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>
</build>