Merge "BUG-1442: integrate XML/JSON Normalized Node writers with Restconf"
authorTony Tkacik <ttkacik@cisco.com>
Tue, 2 Sep 2014 05:37:54 +0000 (05:37 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 2 Sep 2014 05:37:54 +0000 (05:37 +0000)
features/mdsal/pom.xml
features/mdsal/src/main/resources/features.xml
opendaylight/md-sal/sal-rest-docgen/src/main/resources/WEB-INF/web.xml
opendaylight/md-sal/sal-rest-docgen/src/main/resources/explorer/index.html

index 3a9de7abcd13cc74c80833a6152bd84a43e87003..008484e7c67cc04b9599e2577cad6f7ec1cf4252 100644 (file)
       <type>xml</type>
       <classifier>config</classifier>
     </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>sal-rest-docgen</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-annotations</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.datatype</groupId>
+      <artifactId>jackson-datatype-json-org</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.module</groupId>
+      <artifactId>jackson-module-jaxb-annotations</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.jaxrs</groupId>
+      <artifactId>jackson-jaxrs-base</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.jaxrs</groupId>
+      <artifactId>jackson-jaxrs-json-provider</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.json</groupId>
+      <artifactId>json</artifactId>
+    </dependency>
     <!-- test to validate features.xml -->
     <dependency>
       <groupId>org.opendaylight.yangtools</groupId>
index 9e29fc84f813ffb15e4c55440824c2708785b538..0176a0388c76f46e57489a6d439446d632ced7e8 100644 (file)
         <bundle>mvn:org.opendaylight.controller/sal-dom-xsql/${project.version}</bundle>
         <configfile finalname="${config.configfile.directory}/${config.xsql.configfile}">mvn:org.opendaylight.controller/sal-dom-xsql-config/${project.version}/xml/config</configfile>
     </feature>
+    <feature name ='odl-mdsal-apidocs' version='${project.version}'>
+        <feature version='${project.version}'>odl-restconf</feature>
+        <bundle>mvn:org.opendaylight.controller/sal-rest-docgen/${project.version}</bundle>
+        <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson.version}</bundle>
+        <bundle>mvn:com.fasterxml.jackson.core/jackson-core/${jackson.version}</bundle>
+        <bundle>mvn:com.fasterxml.jackson.core/jackson-databind/${jackson.version}</bundle>
+        <bundle>mvn:com.fasterxml.jackson.datatype/jackson-datatype-json-org/${jackson.version}</bundle>
+        <bundle>mvn:com.fasterxml.jackson.module/jackson-module-jaxb-annotations/${jackson.version}</bundle>
+        <bundle>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/${jackson.version}</bundle>
+        <bundle>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/${jackson.version}</bundle>
+        <bundle>mvn:com.sun.jersey/jersey-core/${jersey.version}</bundle>
+        <bundle>mvn:com.sun.jersey/jersey-server/${jersey.version}</bundle>
+        <bundle>mvn:com.sun.jersey/jersey-servlet/${jersey.version}</bundle>
+        <bundle>wrap:mvn:org.json/json/${org.json.version}</bundle>
+    </feature>
 </features>
index 2a778180d4448dd33ce7cabb17f911e77151df9f..c470b3237ea7fe2dd69f37254cae4b38439c8861 100644 (file)
@@ -2,7 +2,9 @@
 <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
     version="3.0">
-
+    <welcome-file-list>
+        <welcome-file>index.html</welcome-file>
+    </welcome-file-list>
     <servlet>
         <servlet-name>JAXRSApiDoc</servlet-name>
         <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
index 05a76a4cb7ca0551d0bb55322b4603f78eb7fd4b..f12616bc4b910d8127fc7269ea8bd5bc6b863dd5 100644 (file)
@@ -32,7 +32,7 @@
        var loadMount = function(mountIndex, mountPath) {\r
                $("#message").empty();\r
                $("#message").append( "<p>Loading...</p>" );\r
-               loadSwagger("http://localhost:8080/apidoc/apis/mounts/" + mountIndex,\r
+               loadSwagger("/apidoc/apis/mounts/" + mountIndex,\r
                                "swagger-ui-container");\r
                $("#message").empty();\r
                $("#message").append( "<h2><b>Showing mount points for " + mountPath + "</b></h2>");\r
@@ -48,7 +48,7 @@
        //loads the root swagger documenation (which comes from RestConf)\r
        var loadRootSwagger = function() {\r
                $("#message").empty();\r
-               loadSwagger("http://localhost:8080/apidoc/apis", "swagger-ui-container");\r
+               loadSwagger("/apidoc/apis", "swagger-ui-container");\r
        }\r
 \r
        //main method to initialize the mount list / swagger docs / tabs on page load\r