cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject cxf git commit: [CXF-6557] Use the default swagger-ui html page in swagger2_web sample
Date Tue, 25 Aug 2015 14:01:52 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 2dae57133 -> a3c8d457d


[CXF-6557] Use the default swagger-ui html page in swagger2_web sample


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/a3c8d457
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a3c8d457
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a3c8d457

Branch: refs/heads/master
Commit: a3c8d457d88988779cc9b8676ac1d5472071634b
Parents: 2dae571
Author: Akitoshi Yoshida <ay@apache.org>
Authored: Tue Aug 25 16:00:57 2015 +0200
Committer: Akitoshi Yoshida <ay@apache.org>
Committed: Tue Aug 25 16:01:46 2015 +0200

----------------------------------------------------------------------
 .../jax_rs/description_swagger2_web/README.txt  |  9 ++-
 .../jax_rs/description_swagger2_web/pom.xml     |  3 -
 .../src/main/webapp/index.html                  | 84 --------------------
 3 files changed, 8 insertions(+), 88 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/a3c8d457/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 7ecb9f2..3605e65 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
@@ -15,8 +15,15 @@ located), the Maven pom.xml file can be used to build and run the demo.
 Using either UNIX or Windows:
 
   mvn install
-  mvn package tomcat7:run  (from one command line window)  
+  mvn package tomcat7:run
 
+To view the swagger document, use your Browser and open the page at
+
+  http://localhost:9000/?url=/app/swaggerSample/swagger.json
+
+or
+
+  http://localhost:9000/?url=/app/swaggerSample/swagger.yaml
 
 To remove the target dir, run mvn clean".
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/a3c8d457/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 7a19507..ede77e9 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
@@ -77,9 +77,6 @@ under the License.
                                 <resource>
                                     <directory>${project.build.directory}/swagger-ui/META-INF/resources/webjars/swagger-ui/2.1.0</directory>
                                     <filtering>true</filtering>
-                                    <excludes>
-                                        <exclude>index.html</exclude>
-                                    </excludes>
                                 </resource>
                             </resources>
                         </configuration>

http://git-wip-us.apache.org/repos/asf/cxf/blob/a3c8d457/distribution/src/main/release/samples/jax_rs/description_swagger2_web/src/main/webapp/index.html
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/description_swagger2_web/src/main/webapp/index.html
b/distribution/src/main/release/samples/jax_rs/description_swagger2_web/src/main/webapp/index.html
deleted file mode 100644
index b32bb69..0000000
--- a/distribution/src/main/release/samples/jax_rs/description_swagger2_web/src/main/webapp/index.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<!DOCTYPE html>
-<html>
-<!-- This page is generated from swagger-ui-2.1.0/index.html.gz -->
-<head>
-  <title>Swagger UI + JAX-RS demo</title>
-  <link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
-  <link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
-  <link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
-  <link href='css/print.css' media='print' rel='stylesheet' type='text/css'/>
-  <script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
-  <script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
-  <script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
-  <script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
-  <script src='lib/handlebars-2.0.0.js' type='text/javascript'></script>
-  <script src='lib/underscore-min.js' type='text/javascript'></script>
-  <script src='lib/backbone-min.js' type='text/javascript'></script>
-  <script src='swagger-ui.js' type='text/javascript'></script>
-  <script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
-  <script src='lib/marked.js' type='text/javascript'></script>
-  <script src='lib/swagger-oauth.js' type='text/javascript'></script>
-
-  <script type="text/javascript">
-    $(function () {
-      var url = "/app/swaggerSample/swagger.json";
-      window.swaggerUi = new SwaggerUi({
-        url: url,
-        dom_id: "swagger-ui-container",
-        supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
-        onComplete: function(swaggerApi, swaggerUi){
-          if(typeof initOAuth == "function") {
-            initOAuth({
-              clientId: "your-client-id",
-              realm: "your-realms",
-              appName: "your-app-name"
-            });
-          }
-
-          $('pre code').each(function(i, e) {
-            hljs.highlightBlock(e)
-          });
-
-          addApiKeyAuthorization();
-        },
-        onFailure: function(data) {
-          log("Unable to Load SwaggerUI");
-        },
-        docExpansion: "none",
-        apisSorter: "alpha",
-        showRequestHeaders: false
-      });
-
-      function addApiKeyAuthorization(){
-        var key = encodeURIComponent($('#input_apiKey')[0].value);
-        if(key && key.trim() != "") {
-            var apiKeyAuth = new SwaggerClient.ApiKeyAuthorization("api_key", key, "query");
-            window.swaggerUi.api.clientAuthorizations.add("api_key", apiKeyAuth);
-            log("added key " + key);
-        }
-      }
-
-      $('#input_apiKey').change(addApiKeyAuthorization);
-
-      // if you have an apiKey you would like to pre-populate on the page for demonstration
purposes...
-      /*
-        var apiKey = "myApiKeyXXXX123456789";
-        $('#input_apiKey').val(apiKey);
-      */
-
-      window.swaggerUi.load();
-
-      function log() {
-        if ('console' in window) {
-          console.log.apply(console, arguments);
-        }
-      }
-  });
-  </script>
-</head>
-
-<body class="swagger-section">
-<div id="message-bar" class="swagger-ui-wrap">&nbsp;</div>
-<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
-</body>
-</html>


Mime
View raw message