mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-08-28 17:57:16 +00:00
Move Swagger doc to server.go
This commit is contained in:
@@ -58,4 +58,4 @@ release:
|
||||
|
||||
swagger:
|
||||
GO111MODULE=on go get github.com/swaggo/swag/cmd/swag
|
||||
cd pkg/api && $$(go env GOPATH)/bin/swag init
|
||||
cd pkg/api && $$(go env GOPATH)/bin/swag init -g server.go
|
||||
@@ -1,6 +1,6 @@
|
||||
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// This file was generated by swaggo/swag at
|
||||
// 2019-08-07 15:15:38.193457 +0300 EEST m=+0.022158637
|
||||
// 2019-08-07 15:19:14.198371 +0300 EEST m=+0.021097345
|
||||
|
||||
package docs
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
package api
|
||||
|
||||
// @title Podinfo API
|
||||
// @version 2.0
|
||||
// @description Go microservice template for Kubernetes.
|
||||
|
||||
// @contact.name Source Code
|
||||
// @contact.url https://github.com/stefanprodan/podinfo
|
||||
|
||||
// @license.name MIT License
|
||||
// @license.url https://github.com/stefanprodan/podinfo/blob/master/LICENSE
|
||||
|
||||
// @host localhost:9898
|
||||
// @BasePath /
|
||||
// @schemes http https
|
||||
|
||||
type ArrayResponse []string
|
||||
type MapResponse map[string]string
|
||||
@@ -20,6 +20,20 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
// @title Podinfo API
|
||||
// @version 2.0
|
||||
// @description Go microservice template for Kubernetes.
|
||||
|
||||
// @contact.name Source Code
|
||||
// @contact.url https://github.com/stefanprodan/podinfo
|
||||
|
||||
// @license.name MIT License
|
||||
// @license.url https://github.com/stefanprodan/podinfo/blob/master/LICENSE
|
||||
|
||||
// @host localhost:9898
|
||||
// @BasePath /
|
||||
// @schemes http https
|
||||
|
||||
var (
|
||||
healthy int32
|
||||
ready int32
|
||||
@@ -222,3 +236,6 @@ func (s *Server) printRoutes() {
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
type ArrayResponse []string
|
||||
type MapResponse map[string]string
|
||||
|
||||
Reference in New Issue
Block a user