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": "[email protected]:swagger-api/swagger-ui.git",
+  "contributors": [
+    "(in alphabetical order)",
+    "Anna Bodnia <[email protected]>",
+    "Buu Nguyen <[email protected]>",
+    "Josh Ponelat <[email protected]>",
+    "Kyle Shockey <[email protected]>",
+    "Robert Barnwell <[email protected]>",
+    "Sahar Jafari <[email protected]>"
+  ],

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:
[email protected]


Reply via email to