Skip to content

Commit

Permalink
Removed swagger-ui as openapi.yaml is sufficient
Browse files Browse the repository at this point in the history
  • Loading branch information
cschneider4711 committed Dec 19, 2024
1 parent cc1543d commit 8ece64a
Show file tree
Hide file tree
Showing 15 changed files with 1 addition and 19,514 deletions.
1 change: 0 additions & 1 deletion internal/threagile/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,5 @@ const (
" - graphics-go (BSD License): https://github.com/BurntSushi/graphics-go/blob/master/LICENSE\n" +
" - google-uuid (BSD License): https://github.com/google/uuid/blob/master/LICENSE\n" +
" - gin-gonic (MIT License): https://github.com/gin-gonic/gin/blob/master/LICENSE\n" +
" - swagger-ui (Apache License): https://swagger.io/license/\n" +
" - cobra-cli (Apache License): https://github.com/spf13/cobra-cli/blob/main/LICENSE.txt\n"
)
7 changes: 0 additions & 7 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,6 @@ func RunServer(config serverConfigReader, builtinRiskRules types.RiskRules) {
router.StaticFile("/schema.json", filepath.Join(s.config.GetAppFolder(), "schema.json"))
router.StaticFile("/live-templates.txt", filepath.Join(s.config.GetAppFolder(), "live-templates.txt"))
router.StaticFile("/openapi.yaml", filepath.Join(s.config.GetAppFolder(), "openapi.yaml"))
router.StaticFile("/swagger-ui/", filepath.Join(s.config.GetServerFolder(), "static", "swagger-ui/index.html"))
router.StaticFile("/swagger-ui/index.html", filepath.Join(s.config.GetServerFolder(), "static", "swagger-ui/index.html"))
router.StaticFile("/swagger-ui/oauth2-redirect.html", filepath.Join(s.config.GetServerFolder(), "static", "swagger-ui/oauth2-redirect.html"))
router.StaticFile("/swagger-ui/swagger-ui.css", filepath.Join(s.config.GetServerFolder(), "static", "swagger-ui/swagger-ui.css"))
router.StaticFile("/swagger-ui/swagger-ui.js", filepath.Join(s.config.GetServerFolder(), "static", "swagger-ui/swagger-ui.js"))
router.StaticFile("/swagger-ui/swagger-ui-bundle.js", filepath.Join(s.config.GetServerFolder(), "static", "swagger-ui/swagger-ui-bundle.js"))
router.StaticFile("/swagger-ui/swagger-ui-standalone-preset.js", filepath.Join(s.config.GetServerFolder(), "static", "swagger-ui/swagger-ui-standalone-preset.js")) // <==

router.GET("/threagile-example-model.yaml", s.exampleFile)
router.GET("/threagile-stub-model.yaml", s.stubFile)
Expand Down
2 changes: 1 addition & 1 deletion server/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<tr>
<td align="center" valign="top" style="font-size: 1em;">
Looking for the API?<br/>
See <a href="openapi.yaml">openapi.yaml</a> &amp; <a href="swagger-ui">swagger-ui</a>.
See <a href="openapi.yaml">openapi.yaml</a>
</td>
</tr>
<tr>
Expand Down
Binary file removed server/static/swagger-ui/favicon-16x16.png
Binary file not shown.
Binary file removed server/static/swagger-ui/favicon-32x32.png
Binary file not shown.
57 changes: 0 additions & 57 deletions server/static/swagger-ui/index.html

This file was deleted.

71 changes: 0 additions & 71 deletions server/static/swagger-ui/oauth2-redirect.html

This file was deleted.

134 changes: 0 additions & 134 deletions server/static/swagger-ui/swagger-ui-bundle.js

This file was deleted.

1 change: 0 additions & 1 deletion server/static/swagger-ui/swagger-ui-bundle.js.map

This file was deleted.

22 changes: 0 additions & 22 deletions server/static/swagger-ui/swagger-ui-standalone-preset.js

This file was deleted.

Loading

0 comments on commit 8ece64a

Please sign in to comment.