History

feat: update swagger embedded files (#66)

Eason Lin committed 7 years ago

Commit 08f49131 parent 2d58c083 files · +12 −15Browse files

Showing the changes to example/basic (1 of 3 files). Show all

Unified · Split

example/basic/main.go+2−2
@@ -2,8 +2,8 @@ package main · 1 unmodified line
2 2
3import (3import (
4 "github.com/gin-gonic/gin"4 "github.com/gin-gonic/gin"
5 "github.com/swaggo/files"
5 "github.com/swaggo/gin-swagger"6 "github.com/swaggo/gin-swagger"
6 "github.com/swaggo/gin-swagger/swaggerFiles"
7 7
8 _ "github.com/swaggo/gin-swagger/example/basic/docs"8 _ "github.com/swaggo/gin-swagger/example/basic/docs"
9)9)
@@ -25,7 +25,7 @@ import ( · 15 unmodified lines
25func main() {25func main() {
26 r := gin.New()26 r := gin.New()
27 27
28 url := ginSwagger.URL("http://localhost:8080/swagger/doc.json") //The url pointing to API definition28 url := ginSwagger.URL("http://localhost:8080/swagger/doc.json") // The url pointing to API definition
29 r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler, url))29 r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler, url))
30 30
31 r.Run()31 r.Run()

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t