You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by GitBox <gi...@apache.org> on 2020/12/15 11:07:21 UTC

[GitHub] [knox] smolnar82 opened a new pull request #393: KNOX-2509 - Added OpenAPI UI (v3.36.2) for documenting Knox's REST API endpoints and models

smolnar82 opened a new pull request #393:
URL: https://github.com/apache/knox/pull/393


   ## What changes were proposed in this pull request?
   
   In this change, I'm integrating Open API UI version 3.36.2 into the Knox Home page, under `home/swagger`. The UI itself is downloaded and unpacked as I needed to modify the out-of-the-box `index.html`.
   
   I annotated many of the resources in the relevant classes, but that work is not yet finished (it'll come later in a different PR). I just wanted to make sure the UI itself, its build integration, and the basic annotations are merged into Apache.
   
   The location of the Swagger browser is available here (assuming a fresh Knox install): https://localhost:8443/home/swagger/
   
   ## How was this patch tested?
   
   Ran a full build including tests, static code analyzing tools.
   
   Manually tested the UI itself.
   
   <img width="1609" alt="Screen Shot 2020-12-15 at 12 00 13 PM" src="https://user-images.githubusercontent.com/34065904/102206682-4b735700-3ecd-11eb-8f23-92b2fa11808c.png">
   <img width="1610" alt="Screen Shot 2020-12-15 at 12 00 54 PM" src="https://user-images.githubusercontent.com/34065904/102206691-4f06de00-3ecd-11eb-8a6c-4e6dbfa83ce8.png">
   <img width="1597" alt="Screen Shot 2020-12-15 at 12 01 23 PM" src="https://user-images.githubusercontent.com/34065904/102206695-4f9f7480-3ecd-11eb-8563-9ed8deccd180.png">
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [knox] smolnar82 commented on a change in pull request #393: KNOX-2509 - Added OpenAPI UI (v3.36.2) for documenting Knox's REST API endpoints and models

Posted by GitBox <gi...@apache.org>.
smolnar82 commented on a change in pull request #393:
URL: https://github.com/apache/knox/pull/393#discussion_r543498074



##########
File path: gateway-openapi-ui/src/main/resources/swagger/oauth2-redirect.html
##########
@@ -0,0 +1,74 @@
+<!doctype html>

Review comment:
       Fixed.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [knox] smolnar82 commented on a change in pull request #393: KNOX-2509 - Added OpenAPI UI (v3.36.2) for documenting Knox's REST API endpoints and models

Posted by GitBox <gi...@apache.org>.
smolnar82 commented on a change in pull request #393:
URL: https://github.com/apache/knox/pull/393#discussion_r543461224



##########
File path: pom.xml
##########
@@ -438,6 +440,12 @@
                         <exclude>atlassian-ide-plugin.xml</exclude>
                         <exclude>**/PULL_REQUEST_TEMPLATE*</exclude>
                         <exclude>**/new-service-definition-template.xml</exclude>
+                        <exclude>**/swagger/*.js</exclude>
+                        <exclude>**/swagger/*.js.map</exclude>
+                        <exclude>**/swagger/*.html</exclude>
+                        <exclude>**/swagger/*.css</exclude>
+                        <exclude>**/swagger/*.css.map</exclude>
+                        <exclude>**/swagger/*.md</exclude>

Review comment:
       Actually, Swagger is under Apache 2.0: https://swagger.io/license/
   Let me add license headers accordingly.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [knox] smolnar82 merged pull request #393: KNOX-2509 - Added OpenAPI UI (v3.36.2) for documenting Knox's REST API endpoints and models

Posted by GitBox <gi...@apache.org>.
smolnar82 merged pull request #393:
URL: https://github.com/apache/knox/pull/393


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [knox] smolnar82 commented on a change in pull request #393: KNOX-2509 - Added OpenAPI UI (v3.36.2) for documenting Knox's REST API endpoints and models

Posted by GitBox <gi...@apache.org>.
smolnar82 commented on a change in pull request #393:
URL: https://github.com/apache/knox/pull/393#discussion_r543499360



##########
File path: gateway-openapi-ui/src/main/resources/swagger/package.json
##########
@@ -0,0 +1,18 @@
+{
+  "name": "swagger-ui-dist",
+  "version": "3.36.2",
+  "main": "index.js",
+  "repository": "git@github.com:swagger-api/swagger-ui.git",
+  "contributors": [
+    "(in alphabetical order)",
+    "Anna Bodnia <an...@gmail.com>",
+    "Buu Nguyen <bu...@gmail.com>",
+    "Josh Ponelat <jp...@gmail.com>",
+    "Kyle Shockey <ky...@gmail.com>",
+    "Robert Barnwell <ro...@robertismy.name>",
+    "Sahar Jafari <sh...@gmail.com>"
+  ],

Review comment:
       Removed.

##########
File path: pom.xml
##########
@@ -438,6 +440,12 @@
                         <exclude>atlassian-ide-plugin.xml</exclude>
                         <exclude>**/PULL_REQUEST_TEMPLATE*</exclude>
                         <exclude>**/new-service-definition-template.xml</exclude>
+                        <exclude>**/swagger/*.js</exclude>
+                        <exclude>**/swagger/*.js.map</exclude>
+                        <exclude>**/swagger/*.html</exclude>
+                        <exclude>**/swagger/*.css</exclude>
+                        <exclude>**/swagger/*.css.map</exclude>
+                        <exclude>**/swagger/*.md</exclude>

Review comment:
       Fixed.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [knox] risdenk commented on a change in pull request #393: KNOX-2509 - Added OpenAPI UI (v3.36.2) for documenting Knox's REST API endpoints and models

Posted by GitBox <gi...@apache.org>.
risdenk commented on a change in pull request #393:
URL: https://github.com/apache/knox/pull/393#discussion_r543418701



##########
File path: pom.xml
##########
@@ -438,6 +440,12 @@
                         <exclude>atlassian-ide-plugin.xml</exclude>
                         <exclude>**/PULL_REQUEST_TEMPLATE*</exclude>
                         <exclude>**/new-service-definition-template.xml</exclude>
+                        <exclude>**/swagger/*.js</exclude>
+                        <exclude>**/swagger/*.js.map</exclude>
+                        <exclude>**/swagger/*.html</exclude>
+                        <exclude>**/swagger/*.css</exclude>
+                        <exclude>**/swagger/*.css.map</exclude>
+                        <exclude>**/swagger/*.md</exclude>

Review comment:
       It should be the Swagger license whatever that is and it should be added to the downloaded static files. It should not be the Apache license.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [knox] risdenk commented on a change in pull request #393: KNOX-2509 - Added OpenAPI UI (v3.36.2) for documenting Knox's REST API endpoints and models

Posted by GitBox <gi...@apache.org>.
risdenk commented on a change in pull request #393:
URL: https://github.com/apache/knox/pull/393#discussion_r543390280



##########
File path: gateway-openapi-ui/src/main/resources/swagger/absolute-path.js
##########
@@ -0,0 +1,14 @@
+/*

Review comment:
       Missing license?

##########
File path: gateway-openapi-ui/src/main/resources/swagger/index_admin.html
##########
@@ -0,0 +1,39 @@
+<!-- HTML for static distribution bundle build -->

Review comment:
       Missing license

##########
File path: gateway-openapi-ui/src/main/resources/swagger/index.js
##########
@@ -0,0 +1,17 @@
+try {

Review comment:
       Missing license

##########
File path: gateway-openapi-ui/pom.xml
##########
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<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.apache.knox</groupId>
+        <artifactId>gateway</artifactId>
+        <version>1.5.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>gateway-openapi-ui</artifactId>
+    <name>gateway-openapi-ui</name>
+    <packaging>jar</packaging>
+    <description>Generating Open API (aka. Swagger) UI</description>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>com.github.kongchen</groupId>
+                <artifactId>swagger-maven-plugin</artifactId>
+                <version>3.1.7</version>

Review comment:
       Can this version be moved to top level pom?

##########
File path: gateway-openapi-ui/src/main/resources/swagger/index_metadata.html
##########
@@ -0,0 +1,45 @@
+<!-- HTML for static distribution bundle build -->

Review comment:
       Missing license

##########
File path: gateway-openapi-ui/src/main/resources/swagger/index_metadata.html
##########
@@ -0,0 +1,45 @@
+<!-- HTML for static distribution bundle build -->
+
+<html lang="en">
+  <head>
+    <meta charset="UTF-8">
+    <title>The Apache Knox REST API</title>
+    <link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
+    <link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
+    <link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
+    <style>
+html, body, iframe { height: 100%; }
+        #content {
+    height:100%;
+}
+    </style>
+  </head>
+
+  <body>
+    <div id="swagger-ui"></div>
+
+    <script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
+    <script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
+    <script>
+    window.onload = function() {
+      // Begin Swagger UI call region
+      const ui = SwaggerUIBundle({
+        url: "https://localhost:8443/gateway/homepage/home/swagger/metadata.json",

Review comment:
       Is localhost always correct here?

##########
File path: gateway-openapi-ui/src/main/resources/swagger/index.html
##########
@@ -0,0 +1,57 @@
+<!-- HTML for static distribution bundle build -->

Review comment:
       Missing license

##########
File path: gateway-service-metadata/pom.xml
##########
@@ -28,6 +28,7 @@
     <artifactId>gateway-service-metadata</artifactId>
     <name>gateway-service-metadata</name>
 
+

Review comment:
       Nit: extra line

##########
File path: gateway-openapi-ui/src/main/resources/swagger/oauth2-redirect.html
##########
@@ -0,0 +1,74 @@
+<!doctype html>

Review comment:
       Missing license

##########
File path: gateway-openapi-ui/src/main/resources/swagger/index_admin.html
##########
@@ -0,0 +1,39 @@
+<!-- HTML for static distribution bundle build -->
+
+<html lang="en">
+  <head>
+    <meta charset="UTF-8">
+    <title>The Apache Knox REST API</title>
+    <link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
+    <link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
+    <link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
+  </head>
+
+  <body>
+    <div id="swagger-ui"></div>
+
+    <script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
+    <script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
+    <script>
+    window.onload = function() {
+      // Begin Swagger UI call region
+      const ui = SwaggerUIBundle({
+        url: "https://localhost:8443/gateway/homepage/home/swagger/admin.json",

Review comment:
       Is localhost always correct here?

##########
File path: pom.xml
##########
@@ -438,6 +440,12 @@
                         <exclude>atlassian-ide-plugin.xml</exclude>
                         <exclude>**/PULL_REQUEST_TEMPLATE*</exclude>
                         <exclude>**/new-service-definition-template.xml</exclude>
+                        <exclude>**/swagger/*.js</exclude>
+                        <exclude>**/swagger/*.js.map</exclude>
+                        <exclude>**/swagger/*.html</exclude>
+                        <exclude>**/swagger/*.css</exclude>
+                        <exclude>**/swagger/*.css.map</exclude>
+                        <exclude>**/swagger/*.md</exclude>

Review comment:
       I don't think this is correct. We need license notices on most of our files. Especially the js, html, css, and md. If the filetype supports comments - there should be a license.

##########
File path: gateway-openapi-ui/src/main/resources/swagger/package.json
##########
@@ -0,0 +1,18 @@
+{
+  "name": "swagger-ui-dist",
+  "version": "3.36.2",
+  "main": "index.js",
+  "repository": "git@github.com:swagger-api/swagger-ui.git",
+  "contributors": [
+    "(in alphabetical order)",
+    "Anna Bodnia <an...@gmail.com>",
+    "Buu Nguyen <bu...@gmail.com>",
+    "Josh Ponelat <jp...@gmail.com>",
+    "Kyle Shockey <ky...@gmail.com>",
+    "Robert Barnwell <ro...@robertismy.name>",
+    "Sahar Jafari <sh...@gmail.com>"
+  ],

Review comment:
       Is this required? Does this need to be kept up to date?

##########
File path: gateway-openapi-ui/src/main/resources/swagger/README.md
##########
@@ -0,0 +1,22 @@
+# Swagger UI Dist
+[![NPM version](https://badge.fury.io/js/swagger-ui-dist.svg)](http://badge.fury.io/js/swagger-ui-dist)
+
+# API
+
+This module, `swagger-ui-dist`, exposes Swagger-UI's entire dist folder as a dependency-free npm module.
+Use `swagger-ui` instead, if you'd like to have npm install dependencies for you.
+
+`SwaggerUIBundle` and `SwaggerUIStandalonePreset` can be imported:
+```javascript
+  import { SwaggerUIBundle, SwaggerUIStandalonePreset } from "swagger-ui-dist"
+```
+
+To get an absolute path to this directory for static file serving, use the exported `getAbsoluteFSPath` method:
+
+```javascript
+const swaggerUiAssetPath = require("swagger-ui-dist").getAbsoluteFSPath()
+
+// then instantiate server that serves files from the swaggerUiAssetPath
+```
+
+For anything else, check the [Swagger-UI](https://github.com/swagger-api/swagger-ui) repository.

Review comment:
       This looks generated? Does it apply to Knox?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [knox] smolnar82 commented on a change in pull request #393: KNOX-2509 - Added OpenAPI UI (v3.36.2) for documenting Knox's REST API endpoints and models

Posted by GitBox <gi...@apache.org>.
smolnar82 commented on a change in pull request #393:
URL: https://github.com/apache/knox/pull/393#discussion_r543460353



##########
File path: gateway-openapi-ui/src/main/resources/swagger/index_admin.html
##########
@@ -0,0 +1,39 @@
+<!-- HTML for static distribution bundle build -->
+
+<html lang="en">
+  <head>
+    <meta charset="UTF-8">
+    <title>The Apache Knox REST API</title>
+    <link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
+    <link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
+    <link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
+  </head>
+
+  <body>
+    <div id="swagger-ui"></div>
+
+    <script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
+    <script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
+    <script>
+    window.onload = function() {
+      // Begin Swagger UI call region
+      const ui = SwaggerUIBundle({
+        url: "https://localhost:8443/gateway/homepage/home/swagger/admin.json",

Review comment:
       It should work in most cases, but let me fix it. Thanks!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [knox] smolnar82 commented on a change in pull request #393: KNOX-2509 - Added OpenAPI UI (v3.36.2) for documenting Knox's REST API endpoints and models

Posted by GitBox <gi...@apache.org>.
smolnar82 commented on a change in pull request #393:
URL: https://github.com/apache/knox/pull/393#discussion_r543498770



##########
File path: gateway-openapi-ui/src/main/resources/swagger/absolute-path.js
##########
@@ -0,0 +1,14 @@
+/*

Review comment:
       Fixed.

##########
File path: gateway-openapi-ui/src/main/resources/swagger/index.html
##########
@@ -0,0 +1,57 @@
+<!-- HTML for static distribution bundle build -->

Review comment:
       Fixed.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [knox] smolnar82 commented on a change in pull request #393: KNOX-2509 - Added OpenAPI UI (v3.36.2) for documenting Knox's REST API endpoints and models

Posted by GitBox <gi...@apache.org>.
smolnar82 commented on a change in pull request #393:
URL: https://github.com/apache/knox/pull/393#discussion_r543410036



##########
File path: gateway-openapi-ui/pom.xml
##########
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<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.apache.knox</groupId>
+        <artifactId>gateway</artifactId>
+        <version>1.5.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>gateway-openapi-ui</artifactId>
+    <name>gateway-openapi-ui</name>
+    <packaging>jar</packaging>
+    <description>Generating Open API (aka. Swagger) UI</description>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>com.github.kongchen</groupId>
+                <artifactId>swagger-maven-plugin</artifactId>
+                <version>3.1.7</version>

Review comment:
       Yes, this was an oversight.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [knox] smolnar82 commented on a change in pull request #393: KNOX-2509 - Added OpenAPI UI (v3.36.2) for documenting Knox's REST API endpoints and models

Posted by GitBox <gi...@apache.org>.
smolnar82 commented on a change in pull request #393:
URL: https://github.com/apache/knox/pull/393#discussion_r543498145



##########
File path: gateway-openapi-ui/src/main/resources/swagger/index_metadata.html
##########
@@ -0,0 +1,45 @@
+<!-- HTML for static distribution bundle build -->
+
+<html lang="en">
+  <head>
+    <meta charset="UTF-8">
+    <title>The Apache Knox REST API</title>
+    <link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
+    <link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
+    <link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
+    <style>
+html, body, iframe { height: 100%; }
+        #content {
+    height:100%;
+}
+    </style>
+  </head>
+
+  <body>
+    <div id="swagger-ui"></div>
+
+    <script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
+    <script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
+    <script>
+    window.onload = function() {
+      // Begin Swagger UI call region
+      const ui = SwaggerUIBundle({
+        url: "https://localhost:8443/gateway/homepage/home/swagger/metadata.json",

Review comment:
       Fixed.

##########
File path: gateway-openapi-ui/src/main/resources/swagger/index_metadata.html
##########
@@ -0,0 +1,45 @@
+<!-- HTML for static distribution bundle build -->

Review comment:
       Fixed.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [knox] smolnar82 commented on a change in pull request #393: KNOX-2509 - Added OpenAPI UI (v3.36.2) for documenting Knox's REST API endpoints and models

Posted by GitBox <gi...@apache.org>.
smolnar82 commented on a change in pull request #393:
URL: https://github.com/apache/knox/pull/393#discussion_r543498306



##########
File path: gateway-openapi-ui/src/main/resources/swagger/index_admin.html
##########
@@ -0,0 +1,39 @@
+<!-- HTML for static distribution bundle build -->
+
+<html lang="en">
+  <head>
+    <meta charset="UTF-8">
+    <title>The Apache Knox REST API</title>
+    <link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
+    <link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
+    <link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
+  </head>
+
+  <body>
+    <div id="swagger-ui"></div>
+
+    <script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
+    <script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
+    <script>
+    window.onload = function() {
+      // Begin Swagger UI call region
+      const ui = SwaggerUIBundle({
+        url: "https://localhost:8443/gateway/homepage/home/swagger/admin.json",

Review comment:
       Fixed.

##########
File path: gateway-openapi-ui/src/main/resources/swagger/index_admin.html
##########
@@ -0,0 +1,39 @@
+<!-- HTML for static distribution bundle build -->

Review comment:
       Fixed.

##########
File path: gateway-openapi-ui/src/main/resources/swagger/index.js
##########
@@ -0,0 +1,17 @@
+try {

Review comment:
       Fixed.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [knox] smolnar82 commented on a change in pull request #393: KNOX-2509 - Added OpenAPI UI (v3.36.2) for documenting Knox's REST API endpoints and models

Posted by GitBox <gi...@apache.org>.
smolnar82 commented on a change in pull request #393:
URL: https://github.com/apache/knox/pull/393#discussion_r543416351



##########
File path: pom.xml
##########
@@ -438,6 +440,12 @@
                         <exclude>atlassian-ide-plugin.xml</exclude>
                         <exclude>**/PULL_REQUEST_TEMPLATE*</exclude>
                         <exclude>**/new-service-definition-template.xml</exclude>
+                        <exclude>**/swagger/*.js</exclude>
+                        <exclude>**/swagger/*.js.map</exclude>
+                        <exclude>**/swagger/*.html</exclude>
+                        <exclude>**/swagger/*.css</exclude>
+                        <exclude>**/swagger/*.css.map</exclude>
+                        <exclude>**/swagger/*.md</exclude>

Review comment:
       So basically, as I explained in the PR description above, these files were downloaded from OpenAPI homepage and were unpacked. I did not want to use [npm](https://www.npmjs.com/package/swagger-ui), because I had to Knoxify the `index.html` page.
   Do you think we should add our Apache license into these downloaded static files too?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [knox] smolnar82 commented on pull request #393: KNOX-2509 - Added OpenAPI UI (v3.36.2) for documenting Knox's REST API endpoints and models

Posted by GitBox <gi...@apache.org>.
smolnar82 commented on pull request #393:
URL: https://github.com/apache/knox/pull/393#issuecomment-745414414


   Thanks, @risdenk !


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [knox] smolnar82 commented on a change in pull request #393: KNOX-2509 - Added OpenAPI UI (v3.36.2) for documenting Knox's REST API endpoints and models

Posted by GitBox <gi...@apache.org>.
smolnar82 commented on a change in pull request #393:
URL: https://github.com/apache/knox/pull/393#discussion_r543411554



##########
File path: gateway-service-metadata/pom.xml
##########
@@ -28,6 +28,7 @@
     <artifactId>gateway-service-metadata</artifactId>
     <name>gateway-service-metadata</name>
 
+

Review comment:
       Ack




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org