Skip to content

Commit 6697be8

Browse files
cfmcgradypan3793
authored andcommitted
[KYUUBI #3710] Delete the swagger UI related resource files from the source folder
### _Why are the changes needed?_ This pr aims to reduce the source file size. This PR removes the swagger UI resource file in the folder `kyuubi-server/src/main/resources/org/apache/kyuubi/ui/swagger` which was introduced by [PR-2061](#2061) , and now we rely on Maven dependency `org.webjars::swagger-ui::4.9.1` to package these resource files, we also add a new REST endpoint `/swagger-static/` for downloading these resource files ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #3710 from cfmcgrady/reduce-src-size. Closes #3710 c83bd31 [Fu Chen] update comment 441129b [Fu Chen] update LICENSE-binary 14eac59 [Fu Chen] update dev/dependencyList 7971c38 [Fu Chen] bump swagger-ui to 4.9.1 455aa20 [Fu Chen] reduce source file size Authored-by: Fu Chen <cfmcgrady@gmail.com> Signed-off-by: Cheng Pan <chengpan@apache.org> (cherry picked from commit bea8e4f) Signed-off-by: Cheng Pan <chengpan@apache.org>
1 parent 8d3d5ba commit 6697be8

21 files changed

+25
-125
lines changed

LICENSE-binary

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,6 @@ io.vertx:vertx-core
321321
io.vertx:vertx-grpc
322322
org.apache.zookeeper:zookeeper
323323

324-
325-
kyuubi-server/src/main/resources/org/apache/kyuubi/ui/swagger/*
326-
327324
BSD
328325
------------
329326
jline:jline

dev/dependencyList

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ swagger-core/2.2.1//swagger-core-2.2.1.jar
173173
swagger-integration/2.2.1//swagger-integration-2.2.1.jar
174174
swagger-jaxrs2/2.2.1//swagger-jaxrs2-2.2.1.jar
175175
swagger-models/2.2.1//swagger-models-2.2.1.jar
176+
swagger-ui/4.9.1//swagger-ui-4.9.1.jar
176177
vertx-core/4.3.2//vertx-core-4.3.2.jar
177178
vertx-grpc/4.3.2//vertx-grpc-4.3.2.jar
178179
zjsonpatch/0.3.0//zjsonpatch-0.3.0.jar

kyuubi-server/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,11 @@
356356
</exclusions>
357357
</dependency>
358358

359+
<dependency>
360+
<groupId>org.webjars</groupId>
361+
<artifactId>swagger-ui</artifactId>
362+
</dependency>
363+
359364
<dependency>
360365
<groupId>org.apache.hive</groupId>
361366
<artifactId>hive-exec</artifactId>
Binary file not shown.
Binary file not shown.

kyuubi-server/src/main/resources/org/apache/kyuubi/ui/swagger/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
<meta charset="UTF-8">
2222
<title>Apache Kyuubi REST API Documentation</title>
2323
<link rel="stylesheet" type="text/css" href="../static/semantic.min.css">
24-
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" />
24+
<link rel="stylesheet" type="text/css" href="../swagger-static/swagger-ui.css" />
2525
<link rel="stylesheet" type="text/css" href="../static/icon.min.css">
26-
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
27-
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
26+
<link rel="icon" type="image/png" href="../swagger-static/favicon-32x32.png" sizes="32x32" />
27+
<link rel="icon" type="image/png" href="../swagger-static/favicon-16x16.png" sizes="16x16" />
2828
<script src="../static/jquery-3.6.0.min.js"></script>
2929
<script src="../static/semantic.min.js"></script>
3030
<style>
@@ -69,8 +69,8 @@
6969

7070
<div id="swagger-ui"></div>
7171

72-
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
73-
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
72+
<script src="../swagger-static/swagger-ui-bundle.js" charset="UTF-8"> </script>
73+
<script src="../swagger-static/swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
7474
<script>
7575
window.onload = function() {
7676
// Begin Swagger UI call region

kyuubi-server/src/main/resources/org/apache/kyuubi/ui/swagger/oauth2-redirect.html

Lines changed: 0 additions & 92 deletions
This file was deleted.

kyuubi-server/src/main/resources/org/apache/kyuubi/ui/swagger/swagger-ui-bundle.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

kyuubi-server/src/main/resources/org/apache/kyuubi/ui/swagger/swagger-ui-bundle.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

kyuubi-server/src/main/resources/org/apache/kyuubi/ui/swagger/swagger-ui-es-bundle-core.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)