You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2016/09/01 10:12:22 UTC
cxf git commit: Updating Swagger2 _web demo to auto-link to SwaggerUI
Repository: cxf
Updated Branches:
refs/heads/master ec95dfbaf -> 1f826fec0
Updating Swagger2 _web demo to auto-link to SwaggerUI
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/1f826fec
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1f826fec
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1f826fec
Branch: refs/heads/master
Commit: 1f826fec077da687aef242c198844beb2c8eb65d
Parents: ec95dfb
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Thu Sep 1 11:11:06 2016 +0100
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Thu Sep 1 11:11:06 2016 +0100
----------------------------------------------------------------------
.../jax_rs/description_swagger2_web/README.txt | 21 +++++---
.../jax_rs/description_swagger2_web/pom.xml | 50 +-------------------
2 files changed, 15 insertions(+), 56 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/1f826fec/distribution/src/main/release/samples/jax_rs/description_swagger2_web/README.txt
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/description_swagger2_web/README.txt b/distribution/src/main/release/samples/jax_rs/description_swagger2_web/README.txt
index a6c520d..32f7f4a 100644
--- a/distribution/src/main/release/samples/jax_rs/description_swagger2_web/README.txt
+++ b/distribution/src/main/release/samples/jax_rs/description_swagger2_web/README.txt
@@ -1,9 +1,8 @@
JAX-RS Swagger2Feature Demo using WebApp with Spring
=================
-The demo shows a basic usage of Swagger API documentation with REST based Web Services using
+The demo shows a basic usage of Swagger API documentation with multiple REST based Web Services using
JAX-RS 2.0 (JSR-339). In this demo, the Swagger2Feature is configured using Spring.
-Swagger UI is available at: http://localhost:9000/
Building and running the demo using Maven
---------------------------------------
@@ -18,21 +17,29 @@ Using either UNIX or Windows:
mvn package tomcat7:run
-After the service is started, the Swagger API documents in JSON and YAML
-are available at
+Two JAX-RS endpoints are availbale after the service has started.
+Swagger API documents in JSON and YAML are available at
http://localhost:9000/app/swaggerSample/swagger.json
http://localhost:9000/app/swaggerSample/swagger.yaml
+and
+
+ http://localhost:9000/app/swaggerSample2/swagger.json
+ http://localhost:9000/app/swaggerSample2/swagger.yaml
To view the Swagger document using Swagger-UI, use your Browser to
open the Swagger-UI page at
- http://localhost:9000/?url=/app/swaggerSample/swagger.json
+ http://localhost:9000/app/swaggerSample/api-docs?url=/app/swaggerSample/swagger.json
+ or
+ http://localhost:9000/app/swaggerSample2/api-docs?url=/app/swaggerSample2/swagger.json
+
+or go to the CXF services page:
-or
+ http://localhost:9000/app/services
- http://localhost:9000/?url=/app/swaggerSample/swagger.yaml
+and follow Swagger links.
To remove the target dir, run mvn clean".
http://git-wip-us.apache.org/repos/asf/cxf/blob/1f826fec/distribution/src/main/release/samples/jax_rs/description_swagger2_web/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/description_swagger2_web/pom.xml b/distribution/src/main/release/samples/jax_rs/description_swagger2_web/pom.xml
index e30d4f6..77689e6 100644
--- a/distribution/src/main/release/samples/jax_rs/description_swagger2_web/pom.xml
+++ b/distribution/src/main/release/samples/jax_rs/description_swagger2_web/pom.xml
@@ -37,53 +37,6 @@ under the License.
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.9</version>
- <executions>
- <execution>
- <phase>generate-resources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.webjars</groupId>
- <artifactId>swagger-ui</artifactId>
- <version>2.1.0</version>
- <overWrite>true</overWrite>
- <outputDirectory>${project.build.directory}/swagger-ui</outputDirectory>
- <excludes>**/*.gz</excludes>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.6</version>
- <executions>
- <execution>
- <id>copy-resources</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}</outputDirectory>
- <resources>
- <resource>
- <directory>${project.build.directory}/swagger-ui/META-INF/resources/webjars/swagger-ui/2.1.0</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
@@ -111,8 +64,7 @@ under the License.
<dependency>
<groupId>org.webjars</groupId>
<artifactId>swagger-ui</artifactId>
- <version>2.1.0</version>
- <scope>provided</scope>
+ <version>2.1.8-M1</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>