From b99cd6b7820481c843d74e221253284a1db830be Mon Sep 17 00:00:00 2001 From: mrajvaid Date: Mon, 5 May 2014 16:10:56 -0700 Subject: [PATCH] Upgrade enunciate version to 1.28 -Convert XmlElementRef to XmlElement to allow doc generation to work properly -Add swagger module dependency to enunciate Change-Id: Ia41e7733bd44965951ca83aaa7738e2df74151da Signed-off-by: mrajvaid --- opendaylight/commons/opendaylight/pom.xml | 7 +- .../connectionmanager/enunciate.xml | 2 +- .../northbound/containermanager/enunciate.xml | 4 +- .../controllermanager/enunciate.xml | 2 +- .../northbound/ControllerProperties.java | 12 +- .../northbound/flowprogrammer/enunciate.xml | 2 +- .../northbound/hosttracker/enunciate.xml | 2 +- .../northbound/java-client/enunciate.xml | 4 +- opendaylight/northbound/java-client/pom.xml | 228 ++++++++---------- .../bridgedomain/enunciate.xml | 4 +- .../neutron/enunciate.xml | 24 +- .../networkconfiguration/neutron/pom.xml | 13 - .../northbound/staticrouting/enunciate.xml | 2 +- .../northbound/statistics/enunciate.xml | 2 +- opendaylight/northbound/subnets/enunciate.xml | 2 +- .../northbound/switchmanager/enunciate.xml | 2 +- .../northbound/NodeConnectorProperties.java | 10 +- .../northbound/NodeProperties.java | 10 +- .../northbound/topology/enunciate.xml | 2 +- .../topology/northbound/EdgeProperties.java | 10 +- .../northbound/usermanager/enunciate.xml | 2 +- 21 files changed, 163 insertions(+), 183 deletions(-) diff --git a/opendaylight/commons/opendaylight/pom.xml b/opendaylight/commons/opendaylight/pom.xml index 6ec506b030..4c545d94c8 100644 --- a/opendaylight/commons/opendaylight/pom.xml +++ b/opendaylight/commons/opendaylight/pom.xml @@ -52,7 +52,7 @@ 2.5.0 1.3.1 - 1.26.2 + 1.28 3.0.0 @@ -1778,6 +1778,11 @@ commons.logback_settings 0.0.2-SNAPSHOT + + org.codehaus.enunciate + enunciate-swagger + ${enunciate.version} + diff --git a/opendaylight/northbound/connectionmanager/enunciate.xml b/opendaylight/northbound/connectionmanager/enunciate.xml index 124f2d84e8..cb21d7c167 100644 --- a/opendaylight/northbound/connectionmanager/enunciate.xml +++ b/opendaylight/northbound/connectionmanager/enunciate.xml @@ -1,6 +1,6 @@ + xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.28.xsd"> diff --git a/opendaylight/northbound/containermanager/enunciate.xml b/opendaylight/northbound/containermanager/enunciate.xml index 9dcab30900..c4e08ae897 100644 --- a/opendaylight/northbound/containermanager/enunciate.xml +++ b/opendaylight/northbound/containermanager/enunciate.xml @@ -1,6 +1,6 @@ + xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.28.xsd"> @@ -8,4 +8,4 @@ - \ No newline at end of file + diff --git a/opendaylight/northbound/controllermanager/enunciate.xml b/opendaylight/northbound/controllermanager/enunciate.xml index 13a2d27c41..5382d54138 100644 --- a/opendaylight/northbound/controllermanager/enunciate.xml +++ b/opendaylight/northbound/controllermanager/enunciate.xml @@ -1,6 +1,6 @@ + xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.28.xsd"> diff --git a/opendaylight/northbound/controllermanager/src/main/java/org/opendaylight/controller/controllermanager/northbound/ControllerProperties.java b/opendaylight/northbound/controllermanager/src/main/java/org/opendaylight/controller/controllermanager/northbound/ControllerProperties.java index 3d45257ce2..cec5a93a9e 100644 --- a/opendaylight/northbound/controllermanager/src/main/java/org/opendaylight/controller/controllermanager/northbound/ControllerProperties.java +++ b/opendaylight/northbound/controllermanager/src/main/java/org/opendaylight/controller/controllermanager/northbound/ControllerProperties.java @@ -11,15 +11,17 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; + import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlRootElement; +import org.opendaylight.controller.sal.core.Property; + import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import org.opendaylight.controller.sal.core.Property; /** * The class describes set of properties attached to a controller @@ -29,12 +31,12 @@ import org.opendaylight.controller.sal.core.Property; @XmlAccessorType(XmlAccessType.NONE) public class ControllerProperties { - @XmlElementRef - @XmlElementWrapper - @JsonIgnore /** * Set to store the controller properties */ + @XmlElement(name="property") + @XmlElementWrapper + @JsonIgnore private Set properties; // JAXB required constructor diff --git a/opendaylight/northbound/flowprogrammer/enunciate.xml b/opendaylight/northbound/flowprogrammer/enunciate.xml index 3ac676907b..8a87876af3 100644 --- a/opendaylight/northbound/flowprogrammer/enunciate.xml +++ b/opendaylight/northbound/flowprogrammer/enunciate.xml @@ -1,6 +1,6 @@ + xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.28.xsd"> diff --git a/opendaylight/northbound/hosttracker/enunciate.xml b/opendaylight/northbound/hosttracker/enunciate.xml index df56dbae36..a8be00a3d3 100644 --- a/opendaylight/northbound/hosttracker/enunciate.xml +++ b/opendaylight/northbound/hosttracker/enunciate.xml @@ -1,6 +1,6 @@ + xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.28.xsd"> diff --git a/opendaylight/northbound/java-client/enunciate.xml b/opendaylight/northbound/java-client/enunciate.xml index ce9186eb33..c78243766e 100644 --- a/opendaylight/northbound/java-client/enunciate.xml +++ b/opendaylight/northbound/java-client/enunciate.xml @@ -1,13 +1,13 @@ + xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.28.xsd"> - + diff --git a/opendaylight/northbound/java-client/pom.xml b/opendaylight/northbound/java-client/pom.xml index 6de347fdde..ae8924feb6 100644 --- a/opendaylight/northbound/java-client/pom.xml +++ b/opendaylight/northbound/java-client/pom.xml @@ -7,12 +7,6 @@ 1.4.2-SNAPSHOT ../../commons/opendaylight - - scm:git:ssh://git.opendaylight.org:29418/controller.git - scm:git:ssh://git.opendaylight.org:29418/controller.git - https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main - HEAD - northbound.client 0.0.1-SNAPSHOT @@ -22,56 +16,100 @@ ${project.build.directory}/rest-api-docs ${project.build.directory}/enunciate/build/java-client/full-client.jar ${project.build.directory}/enunciate/build/java-client/full-client-sources.jar - ${project.build.directory}/enunciate/build/java-client/full-json-client.jar - ${project.build.directory}/enunciate/build/java-client/full-json-client-sources.jar + + + org.codehaus.enunciate + enunciate-core-annotations + + + + + org.opendaylight.controller + connectionmanager.northbound + + + org.opendaylight.controller + controllermanager.northbound + + + org.opendaylight.controller + flowprogrammer.northbound + + + org.opendaylight.controller + forwarding.staticrouting.northbound + + + org.opendaylight.controller + hosttracker.northbound + + + org.opendaylight.controller + networkconfig.bridgedomain.northbound + + + org.opendaylight.controller + networkconfig.neutron.northbound + + + org.opendaylight.controller + statistics.northbound + + + org.opendaylight.controller + subnets.northbound + + + org.opendaylight.controller + switchmanager.northbound + + + org.opendaylight.controller + topology.northbound + + + org.opendaylight.controller + usermanager.northbound + + + - - org.codehaus.enunciate - maven-enunciate-plugin - org.apache.maven.plugins maven-antrun-plugin - 1.5 - - - package - - run - - - - + - - + + - + - - - + + + - + - + + + + + + + - - <![CDATA[ + <![CDATA[ <html> <head> <title> OpenDaylight REST API Documentation </title> @@ -80,39 +118,29 @@ <h2>OpenDaylight REST API Documentation</h2> <p> OpenDaylight supports the following <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">Representational State Transfer (REST)</a> APIs: </p> <h4> - ]]> - - - + ]]> + + - - - + + + - - <![CDATA[ + <![CDATA[ </h4> <i>---</i> </body> </html> - ]]> - + ]]> - + - + - - + + @@ -122,6 +150,18 @@ 20020829 + + + + run + + package + + + + + org.codehaus.enunciate + maven-enunciate-plugin @@ -130,10 +170,10 @@ attach-artifacts - package attach-artifact + package @@ -146,16 +186,6 @@ jar full-java-client-sources - - ${json-client} - jar - full-json-client - - - ${json-client-sources} - jar - full-json-client-sources - @@ -163,60 +193,10 @@ - - - org.codehaus.enunciate - enunciate-core-annotations - - - - - org.opendaylight.controller - connectionmanager.northbound - - - org.opendaylight.controller - controllermanager.northbound - - - org.opendaylight.controller - flowprogrammer.northbound - - - org.opendaylight.controller - hosttracker.northbound - - - org.opendaylight.controller - networkconfig.bridgedomain.northbound - - - org.opendaylight.controller - networkconfig.neutron.northbound - - - org.opendaylight.controller - forwarding.staticrouting.northbound - - - org.opendaylight.controller - statistics.northbound - - - org.opendaylight.controller - subnets.northbound - - - org.opendaylight.controller - switchmanager.northbound - - - org.opendaylight.controller - topology.northbound - - - org.opendaylight.controller - usermanager.northbound - - + + scm:git:ssh://git.opendaylight.org:29418/controller.git + scm:git:ssh://git.opendaylight.org:29418/controller.git + HEAD + https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main + diff --git a/opendaylight/northbound/networkconfiguration/bridgedomain/enunciate.xml b/opendaylight/northbound/networkconfiguration/bridgedomain/enunciate.xml index f5a7ef1233..1555743ea8 100644 --- a/opendaylight/northbound/networkconfiguration/bridgedomain/enunciate.xml +++ b/opendaylight/northbound/networkconfiguration/bridgedomain/enunciate.xml @@ -1,6 +1,6 @@ + xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.28.xsd"> @@ -8,5 +8,5 @@ - + diff --git a/opendaylight/northbound/networkconfiguration/neutron/enunciate.xml b/opendaylight/northbound/networkconfiguration/neutron/enunciate.xml index b9e4f7ecc1..66160255f3 100644 --- a/opendaylight/northbound/networkconfiguration/neutron/enunciate.xml +++ b/opendaylight/northbound/networkconfiguration/neutron/enunciate.xml @@ -1,12 +1,12 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/opendaylight/northbound/networkconfiguration/neutron/pom.xml b/opendaylight/northbound/networkconfiguration/neutron/pom.xml index bc0ab2b78a..a528f7c159 100644 --- a/opendaylight/northbound/networkconfiguration/neutron/pom.xml +++ b/opendaylight/northbound/networkconfiguration/neutron/pom.xml @@ -10,9 +10,6 @@ networkconfig.neutron.northbound 0.4.2-SNAPSHOT bundle - - 1.26.2 - com.sun.jersey @@ -83,16 +80,6 @@ org.codehaus.enunciate maven-enunciate-plugin - - enunciate.xml - - - - - docs - - - diff --git a/opendaylight/northbound/staticrouting/enunciate.xml b/opendaylight/northbound/staticrouting/enunciate.xml index 402b655371..4d2f1cb611 100644 --- a/opendaylight/northbound/staticrouting/enunciate.xml +++ b/opendaylight/northbound/staticrouting/enunciate.xml @@ -1,6 +1,6 @@ + xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.28.xsd"> diff --git a/opendaylight/northbound/statistics/enunciate.xml b/opendaylight/northbound/statistics/enunciate.xml index 63ae439758..c5f9140c76 100644 --- a/opendaylight/northbound/statistics/enunciate.xml +++ b/opendaylight/northbound/statistics/enunciate.xml @@ -1,6 +1,6 @@ + xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.28.xsd"> diff --git a/opendaylight/northbound/subnets/enunciate.xml b/opendaylight/northbound/subnets/enunciate.xml index abdc40a174..e75daf94ee 100644 --- a/opendaylight/northbound/subnets/enunciate.xml +++ b/opendaylight/northbound/subnets/enunciate.xml @@ -1,6 +1,6 @@ + xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.28.xsd"> diff --git a/opendaylight/northbound/switchmanager/enunciate.xml b/opendaylight/northbound/switchmanager/enunciate.xml index 6f2dd4d0e7..3db309d46f 100644 --- a/opendaylight/northbound/switchmanager/enunciate.xml +++ b/opendaylight/northbound/switchmanager/enunciate.xml @@ -1,6 +1,6 @@ + xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.28.xsd"> diff --git a/opendaylight/northbound/switchmanager/src/main/java/org/opendaylight/controller/switchmanager/northbound/NodeConnectorProperties.java b/opendaylight/northbound/switchmanager/src/main/java/org/opendaylight/controller/switchmanager/northbound/NodeConnectorProperties.java index 00f0d4b054..bb3fc0cc03 100644 --- a/opendaylight/northbound/switchmanager/src/main/java/org/opendaylight/controller/switchmanager/northbound/NodeConnectorProperties.java +++ b/opendaylight/northbound/switchmanager/src/main/java/org/opendaylight/controller/switchmanager/northbound/NodeConnectorProperties.java @@ -13,18 +13,19 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; + import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlRootElement; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; import org.opendaylight.controller.sal.core.NodeConnector; import org.opendaylight.controller.sal.core.Property; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * The class describes set of properties attached to a node connector */ @@ -34,7 +35,8 @@ import org.opendaylight.controller.sal.core.Property; public class NodeConnectorProperties { @XmlElement private NodeConnector nodeconnector; - @XmlElementRef + + @XmlElement(name="property") @XmlElementWrapper @JsonIgnore private Set properties; diff --git a/opendaylight/northbound/switchmanager/src/main/java/org/opendaylight/controller/switchmanager/northbound/NodeProperties.java b/opendaylight/northbound/switchmanager/src/main/java/org/opendaylight/controller/switchmanager/northbound/NodeProperties.java index 51e96c49ea..380d759ab7 100644 --- a/opendaylight/northbound/switchmanager/src/main/java/org/opendaylight/controller/switchmanager/northbound/NodeProperties.java +++ b/opendaylight/northbound/switchmanager/src/main/java/org/opendaylight/controller/switchmanager/northbound/NodeProperties.java @@ -13,18 +13,19 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; + import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlRootElement; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; import org.opendaylight.controller.sal.core.Node; import org.opendaylight.controller.sal.core.Property; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * The class describes set of properties attached to a node */ @@ -34,7 +35,8 @@ import org.opendaylight.controller.sal.core.Property; public class NodeProperties { @XmlElement private Node node; - @XmlElementRef + + @XmlElement(name="property") @XmlElementWrapper @JsonIgnore private Set properties; diff --git a/opendaylight/northbound/topology/enunciate.xml b/opendaylight/northbound/topology/enunciate.xml index fed0f68e30..b70ea74071 100644 --- a/opendaylight/northbound/topology/enunciate.xml +++ b/opendaylight/northbound/topology/enunciate.xml @@ -1,6 +1,6 @@ + xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.28.xsd"> diff --git a/opendaylight/northbound/topology/src/main/java/org/opendaylight/controller/topology/northbound/EdgeProperties.java b/opendaylight/northbound/topology/src/main/java/org/opendaylight/controller/topology/northbound/EdgeProperties.java index 1d4a8a66ee..d43b9bc893 100644 --- a/opendaylight/northbound/topology/src/main/java/org/opendaylight/controller/topology/northbound/EdgeProperties.java +++ b/opendaylight/northbound/topology/src/main/java/org/opendaylight/controller/topology/northbound/EdgeProperties.java @@ -13,24 +13,26 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; + import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlRootElement; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; import org.opendaylight.controller.sal.core.Edge; import org.opendaylight.controller.sal.core.Property; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) public class EdgeProperties { @XmlElement private Edge edge; - @XmlElementRef + + @XmlElement(name="property") @XmlElementWrapper @JsonIgnore private Set properties; diff --git a/opendaylight/northbound/usermanager/enunciate.xml b/opendaylight/northbound/usermanager/enunciate.xml index a0b9546539..0386c759b2 100644 --- a/opendaylight/northbound/usermanager/enunciate.xml +++ b/opendaylight/northbound/usermanager/enunciate.xml @@ -1,6 +1,6 @@ + xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.28.xsd"> -- 2.36.6