Skip to content

Commit 5554508

Browse files
committed
Move Swagger doc to server.go
1 parent 94085d6 commit 5554508

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ release:
5858

5959
swagger:
6060
GO111MODULE=on go get github.com/swaggo/swag/cmd/swag
61-
cd pkg/api && $$(go env GOPATH)/bin/swag init
61+
cd pkg/api && $$(go env GOPATH)/bin/swag init -g server.go

pkg/api/docs/docs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
22
// This file was generated by swaggo/swag at
3-
// 2019-08-07 15:15:38.193457 +0300 EEST m=+0.022158637
3+
// 2019-08-07 15:19:14.198371 +0300 EEST m=+0.021097345
44

55
package docs
66

pkg/api/main.go

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

pkg/api/server.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,20 @@ import (
2020
"go.uber.org/zap"
2121
)
2222

23+
// @title Podinfo API
24+
// @version 2.0
25+
// @description Go microservice template for Kubernetes.
26+
27+
// @contact.name Source Code
28+
// @contact.url https://github.com/stefanprodan/podinfo
29+
30+
// @license.name MIT License
31+
// @license.url https://github.com/stefanprodan/podinfo/blob/master/LICENSE
32+
33+
// @host localhost:9898
34+
// @BasePath /
35+
// @schemes http https
36+
2337
var (
2438
healthy int32
2539
ready int32
@@ -222,3 +236,6 @@ func (s *Server) printRoutes() {
222236
return nil
223237
})
224238
}
239+
240+
type ArrayResponse []string
241+
type MapResponse map[string]string

0 commit comments

Comments
 (0)