Skip to content

Commit

Permalink
Get swagger-ui files from another package
Browse files Browse the repository at this point in the history
  • Loading branch information
anilsenay committed Sep 1, 2022
1 parent cb16ce9 commit fc604b1
Show file tree
Hide file tree
Showing 15 changed files with 14 additions and 153 deletions.
8 changes: 6 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ module github.com/go-swagno/swagno-fiber

go 1.18

require github.com/gofiber/fiber/v2 v2.37.0
require (
github.com/go-swagno/swagno-files v0.1.3
github.com/gofiber/fiber/v2 v2.37.0
)

require (
github.com/andybalholm/brotli v1.0.4 // indirect
github.com/klauspost/compress v1.15.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.39.0 // indirect
github.com/valyala/tcplisten v1.0.0 // indirect
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 // indirect
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b // indirect
golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 // indirect
)
7 changes: 6 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY=
github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/go-swagno/swagno-files v0.1.3 h1:L8qWWbClOXXIBZiknHydygLU77bDawzUXCJg4evDfMA=
github.com/go-swagno/swagno-files v0.1.3/go.mod h1:SY6IrcEspFFlVKxduEU1qnrZnu+E6HJKaWfsssvu8Ts=
github.com/gofiber/fiber/v2 v2.37.0 h1:KVboSQ7e0wDbSFXNjXKqoigwp9HYUqgWn4uGFaUO1P8=
github.com/gofiber/fiber/v2 v2.37.0/go.mod h1:xm3pDGlfE1xqVKb77iH8weLU0FFoTeWeK3nbiYM2Nh0=
github.com/klauspost/compress v1.15.0 h1:xqfchp4whNFxn5A4XFyyYtitiWI8Hy5EW59jEwcyL6U=
Expand All @@ -13,12 +15,15 @@ github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7Fw
golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b h1:ZmngSVLe/wycRns9MKikG9OWIEjGcGAkacif7oYQaUY=
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 h1:nhht2DYV/Sn3qOayu8lM+cU1ii9sTLUeBQwQQfUHtrs=
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 h1:v6hYoSR9T5oet+pMXwUWkbiVqx/63mlHjefrHmxwfeY=
golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
Expand Down
5 changes: 2 additions & 3 deletions swagger/handler.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package swagger

import (
"net/http"

swaggerUi "github.com/go-swagno/swagno-files"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"
)
Expand All @@ -28,6 +27,6 @@ func SwaggerHandler(a *fiber.App, doc []byte, config ...Config) {
return c.SendString(swaggerDoc)
})
a.Use(defaultConfig.Prefix, filesystem.New(filesystem.Config{
Root: http.Dir("./swaggerFiles"),
Root: swaggerUi.HTTP,
}))
}
Binary file removed swagger/swaggerFiles/favicon-16x16.png
Binary file not shown.
Binary file removed swagger/swaggerFiles/favicon-32x32.png
Binary file not shown.
16 changes: 0 additions & 16 deletions swagger/swaggerFiles/index.css

This file was deleted.

19 changes: 0 additions & 19 deletions swagger/swaggerFiles/index.html

This file was deleted.

79 changes: 0 additions & 79 deletions swagger/swaggerFiles/oauth2-redirect.html

This file was deleted.

15 changes: 0 additions & 15 deletions swagger/swaggerFiles/swagger-initializer.js

This file was deleted.

3 changes: 0 additions & 3 deletions swagger/swaggerFiles/swagger-ui-bundle.js

This file was deleted.

3 changes: 0 additions & 3 deletions swagger/swaggerFiles/swagger-ui-es-bundle-core.js

This file was deleted.

3 changes: 0 additions & 3 deletions swagger/swaggerFiles/swagger-ui-es-bundle.js

This file was deleted.

3 changes: 0 additions & 3 deletions swagger/swaggerFiles/swagger-ui-standalone-preset.js

This file was deleted.

4 changes: 0 additions & 4 deletions swagger/swaggerFiles/swagger-ui.css

This file was deleted.

2 changes: 0 additions & 2 deletions swagger/swaggerFiles/swagger-ui.js

This file was deleted.

0 comments on commit fc604b1

Please sign in to comment.