summaryrefslogtreecommitdiffstats
path: root/catalog-be
diff options
context:
space:
mode:
authordekstroza <dejan.kitic@ericsson.com>2018-05-18 14:42:24 +0100
committerMichael Lando <ml636r@att.com>2018-08-26 22:58:49 +0000
commit37843cb3c1765bd5263e3c02f5b14ffa53041e1d (patch)
tree0fcd4f0504c6720924bbf2a0bdc92fed0fee1719 /catalog-be
parent1b700c8606f319cbda416a8abb70ea16dceb7a29 (diff)
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>
Diffstat (limited to 'catalog-be')
-rw-r--r--catalog-be/pom.xml61
-rw-r--r--catalog-be/src/test/resources/config/mysql-type.yml2
2 files changed, 40 insertions, 23 deletions
diff --git a/catalog-be/pom.xml b/catalog-be/pom.xml
index 068eecf53b..f0113df130 100644
--- a/catalog-be/pom.xml
+++ b/catalog-be/pom.xml
@@ -1,5 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>catalog-be</artifactId>
@@ -145,7 +145,6 @@
<version>${jersey-bom.version}</version>
<scope>compile</scope>
</dependency>
-
<dependency>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>jersey-spring4</artifactId>
@@ -498,9 +497,6 @@
</exclusion>
</exclusions>
</dependency>
-
-
-
<dependency>
<groupId>com.att.aft</groupId>
<artifactId>dme2</artifactId>
@@ -529,12 +525,10 @@
<scope>test</scope>
</dependency>
-
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>${jersey-bom.version}</version>
-
</dependency>
<dependency>
@@ -594,13 +588,13 @@
<artifactId>cucumber-junit</artifactId>
<scope>test</scope>
</dependency>
-
- <dependency>
- <groupId>org.jmockit</groupId>
- <artifactId>jmockit</artifactId>
- <version>${jmockit.version}</version>
- <scope>test</scope>
- </dependency>
+
+ <dependency>
+ <groupId>org.jmockit</groupId>
+ <artifactId>jmockit</artifactId>
+ <version>${jmockit.version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>com.google.code.bean-matchers</groupId>
@@ -608,9 +602,8 @@
<version>0.11</version>
<scope>test</scope>
</dependency>
-
</dependencies>
-
+
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
@@ -644,6 +637,35 @@
</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>
+ <plugin>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-maven-plugin</artifactId>
<version>${jcabi.maven.plugin.version}</version>
@@ -655,7 +677,6 @@
</execution>
</executions>
</plugin>
-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
@@ -742,8 +763,6 @@
</execution>
</executions>
</plugin>
-
-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
@@ -1003,7 +1022,5 @@
</plugins>
</build>
</profile>
-
-
</profiles>
-</project>
+</project> \ No newline at end of file
diff --git a/catalog-be/src/test/resources/config/mysql-type.yml b/catalog-be/src/test/resources/config/mysql-type.yml
index f1985a0bdc..c275537094 100644
--- a/catalog-be/src/test/resources/config/mysql-type.yml
+++ b/catalog-be/src/test/resources/config/mysql-type.yml
@@ -40,7 +40,7 @@ node_types:
db_password:
type: string
default: pass
- description: The password associated with the user account provided in the ‘db_user’ property.
+ description: The password associated with the user account provided in the db_user property.
bind_address:
type: boolean
default: true