swagger-ui
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>swagger-ui</artifactId> <version>0.1.4-Lithium-SR4</version> </dependency>
<?xml version="1.0" encoding="UTF-8"?> <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"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.opendaylight.controller</groupId> <artifactId>commons.opendaylight</artifactId> <version>1.5.4-Lithium-SR4</version> <relativePath>../../../../../controller/opendaylight/commons/opendaylight</relativePath> </parent> <artifactId>swagger-ui</artifactId> <version>0.1.4-Lithium-SR4</version> <packaging>bundle</packaging> <properties> <api.dir>${resource.dir}/apis</api.dir> <resource.dir>${project.build.directory}/classes</resource.dir> </properties> <dependencies> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> </dependency> <dependency> <groupId>equinoxSDK381</groupId> <artifactId>javax.servlet</artifactId> </dependency> <!-- add dependency on all northbound bundles --> <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>connectionmanager.northbound</artifactId> </dependency> <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>controllermanager.northbound</artifactId> </dependency> <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>flowprogrammer.northbound</artifactId> </dependency> <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>forwarding.staticrouting.northbound</artifactId> </dependency> <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>hosttracker.northbound</artifactId> </dependency> <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>networkconfig.bridgedomain.northbound</artifactId> </dependency> <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>statistics.northbound</artifactId> </dependency> <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>subnets.northbound</artifactId> </dependency> <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>switchmanager.northbound</artifactId> </dependency> <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>topology.northbound</artifactId> </dependency> <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>usermanager.northbound</artifactId> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <extensions>true</extensions> <configuration> <instructions> <Export-Package/> <Import-Package>org.slf4j, javax.annotation, javax.naming, javax.servlet, javax.servlet.annotation, javax.servlet.http, com.google.gson,</Import-Package> <Export-Package/> <Include-Resource>apis=target/classes/apis, index.html=target/classes/index.html, apilist.json=target/classes/apilist.json, css=target/classes/css, lib=target/classes/lib, swagger-ui.min.js=target/classes/swagger-ui.min.js, swagger-ui.js=target/classes/swagger-ui.js, images=target/classes/images, WEB-INF/web.xml=target/classes/WEB-INF/web.xml</Include-Resource> <Web-ContextPath>/swagger</Web-ContextPath> </instructions> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.7</version> <dependencies> <dependency> <groupId>ant-contrib</groupId> <artifactId>ant-contrib</artifactId> <version>1.0b3</version> <exclusions> <exclusion> <groupId>ant</groupId> <artifactId>ant</artifactId> </exclusion> </exclusions> </dependency> </dependencies> <executions> <execution> <goals> <goal>run</goal> </goals> <phase>generate-sources</phase> <configuration> <target> <taskdef classpathref="maven.plugin.classpath" resource="net/sf/antcontrib/antlib.xml"/> <patternset id="rest.paths"> <include name="**/enunciate/generate/swagger/ui/*.json"/> <exclude name="**/java-client/**"/> <exclude name="**/swagger-ui/**"/> </patternset> <echo message="======== Assembling swagger docs ========"/> <!-- make api directory --> <mkdir dir="${api.dir}"/> <!-- copy swagger libs --> <copy todir="${resource.dir}"> <fileset dir="../subnets/target/enunciate/generate/swagger/ui"> <exclude name="**/*.json"/> <exclude name="**/*.png"/> <exclude name="**/index.html"/> </fileset> </copy> <!-- Copy NorthBound json files into ui directory--> <copy todir="${api.dir}"> <fileset dir="${basedir}/../../.."> <patternset refid="rest.paths"/> </fileset> <mapper> <regexpmapper from="^(.*)/([^/]+)/*/target/enunciate/generate/swagger/ui/(.*Northbound).*$$" to="\3"/> <regexpmapper from="^(.*)/([^/]+)/*/target/enunciate/generate/swagger/ui/(.*resource-list.json)$$" to="\2-\3"/> </mapper> </copy> <!-- Correct base path --> <replaceregexp match="/full" replace=""> <fileset dir="${api.dir}"> <include name="**/*Northbound"/> </fileset> </replaceregexp> <!-- Merge Resource list --> <echo append="false" file="${resource.dir}/apilist.json">{ "swaggerVersion": "1.1", "basePath": "http://localhost:8080/swagger/apis", "apis": [</echo> <for param="file"> <path> <fileset dir="${api.dir}"> <include name="**/*resource-list.json"/> </fileset> </path> <sequential> <echo message="Processing json resource @{file}"/> <loadfile property="jsoncontent" srcfile="@{file}"> <filterchain> <headfilter lines="10"/> <tailfilter lines="6"/> </filterchain> </loadfile> <echo append="true" file="${resource.dir}/apilist.json" message="${jsoncontent},"/> <var name="jsoncontent" unset="true"/> </sequential> </for> <echo append="true" file="${resource.dir}/apilist.json">{ } ] }</echo> <!-- Remove .json from api paths --> <replaceregexp file="${resource.dir}/apilist.json" flags="g" match=".json" replace=""/> <replaceregexp file="${resource.dir}/apilist.json" flags="g" match="JAXRS" replace=""/> <!-- cleanup resource files as we don't need them --> <delete> <fileset dir="${api.dir}" includes="**/*resource-list.json"/> </delete> <echo message="======== Build successful ========"/> </target> </configuration> </execution> </executions> </plugin> </plugins> </build> <scm> <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection> <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection> <tag>HEAD</tag> <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main</url> </scm> </project>