ONOS-2486 Adding swagger-based REST API documentation.
Change-Id: I237d973d73549ad30ddc638c1c201f024d344c70
diff --git a/web/api/pom.xml b/web/api/pom.xml
index 7f56c7b..b420186 100644
--- a/web/api/pom.xml
+++ b/web/api/pom.xml
@@ -29,7 +29,7 @@
<artifactId>onos-rest</artifactId>
<packaging>bundle</packaging>
- <description>ONOS REST API</description>
+ <description>ONOS Core REST API</description>
<dependencies>
<dependency>
@@ -57,6 +57,12 @@
<properties>
<web.context>/onos/v1</web.context>
+ <api.version>1.0.0</api.version>
+ <api.title>${project.description}</api.title>
+ <api.description>
+ Core APIs for external interactions with various ONOS subsystems.
+ </api.description>
+ <api.package>org.onosproject.rest.impl</api.package>
</properties>
<build>
@@ -65,6 +71,43 @@
<groupId>org.onosproject</groupId>
<artifactId>onos-maven-plugin</artifactId>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <_wab>src/main/webapp/</_wab>
+ <Include-Resource>
+ WEB-INF/classes/apidoc/swagger.json=target/swagger.json,
+ {maven-resources}
+ </Include-Resource>
+ <Bundle-SymbolicName>
+ ${project.groupId}.${project.artifactId}
+ </Bundle-SymbolicName>
+ <Import-Package>
+ org.slf4j,
+ org.osgi.framework,
+ javax.ws.rs,javax.ws.rs.core,javax.ws.rs.ext,
+ com.sun.jersey.api,
+ com.sun.jersey.spi.container.servlet,
+ com.sun.jersey.server.impl.container.servlet,
+ com.fasterxml.jackson.databind,
+ com.fasterxml.jackson.databind.node,
+ com.google.common.base.*,
+ com.google.common.collect.*,
+ com.google.common.io.*,
+ org.onlab.util.*,
+ org.onlab.osgi.*,
+ org.onlab.packet.*,
+ org.onlab.rest.*,
+ org.onosproject.*
+ </Import-Package>
+ <Web-ContextPath>${web.context}</Web-ContextPath>
+ </instructions>
+ </configuration>
+ </plugin>
</plugins>
</build>