Add swagger.json to main/resources.
[aai/esr-server.git] / esr-mgr / pom.xml
index 7f9057d..cfc1714 100644 (file)
             <version>1.0.0</version>
          </dependency>    
     </dependencies>
+       
+       <profiles>
+        <profile>
+            <id>swagger</id>
+            <dependencies>
+                <dependency>
+                    <groupId>io.swagger</groupId>
+                    <artifactId>swagger-jersey2-jaxrs</artifactId>
+                    <version>1.5.0</version>
+                </dependency>
+            </dependencies>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>com.github.kongchen</groupId>
+                        <artifactId>swagger-maven-plugin</artifactId>
+                        <version>3.1.1</version>
+                        <configuration>
+                            <apiSources>
+                                <apiSource>
+                                    <springmvc>false</springmvc>
+                                    <locations>org.onap.aai.esr.resource</locations>
+                                    <basePath>/api/aai-esr-server/v1/</basePath>
+                                    <info>
+                                        <title>API Descriptions for External System Management</title>
+                                        <version>v1</version>
+                                        <description>
+                                            This page shows all the APIs available in the ESR server module.
+                                        </description>
+                                        <termsOfService>
+                                            http://www.github.com/kongchen/swagger-maven-plugin
+                                        </termsOfService>
+                                        <contact>
+                                            <email>li.zi30@zte.com.cn</email>
+                                            <name>Zi Li</name>
+                                        </contact>
+                                        <license>
+                                            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
+                                            <name>Apache 2.0</name>
+                                        </license>
+                                    </info>
+                                    <securityDefinitions>
+                                    </securityDefinitions>
+                                    <swaggerDirectory>${basedir}/src/main/resources</swaggerDirectory>
+                                </apiSource>
+                            </apiSources>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <phase>compile</phase>
+                                <goals>
+                                    <goal>generate</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <dependencies>
+                            <dependency>
+                                <groupId>io.swagger</groupId>
+                                <artifactId>swagger-hibernate-validations</artifactId>
+                                <version>1.5.6</version>
+                            </dependency>
+                        </dependencies>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 </project>