Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 869e4af2a -> c3c74aa0c
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/c3c74aa0 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c3c74aa0 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c3c74aa0 Branch: refs/heads/3.1.x-fixes Commit: c3c74aa0cae75e09b5432f8e85ecc66616934fe4 Parents: 869e4af Author: Sergey Beryozkin <[email protected]> Authored: Thu Sep 1 11:11:06 2016 +0100 Committer: Sergey Beryozkin <[email protected]> Committed: Thu Sep 1 11:40:56 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/c3c74aa0/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/c3c74aa0/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 821dcad..af2ff1a 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>
