Skip to content

Commit

Permalink
Fixed swagger doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Iliad committed Aug 3, 2018
1 parent 4683ad8 commit bda3e93
Show file tree
Hide file tree
Showing 5 changed files with 212 additions and 204 deletions.
2 changes: 1 addition & 1 deletion cmd/kube-api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"github.com/urfave/cli"
)

//go:generate protoc --go_out=../../proto -I../../proto exec.proto
//go:generate swagger generate spec -m -i ../../swagger-basic.yml -o ../../swagger.json
//go:generate swagger flatten ../../swagger.json -o ../../swagger.json
//go:generate swagger validate ../../swagger.json
//go:generate protoc --go_out=../../proto -I../../proto exec.proto

func main() {
app := cli.NewApp()
Expand Down
14 changes: 7 additions & 7 deletions pkg/router/handlers/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func GetSecretList(ctx *gin.Context) {
// '200':
// description: secret
// schema:
// $ref: '#/definitions/SecretWithParam'
// $ref: '#/definitions/Secret'
// default:
// $ref: '#/responses/error'
func GetSecret(ctx *gin.Context) {
Expand Down Expand Up @@ -153,12 +153,12 @@ func GetSecret(ctx *gin.Context) {
// - name: body
// in: body
// schema:
// $ref: '#/definitions/SecretWithParam'
// $ref: '#/definitions/Secret'
// responses:
// '201':
// description: secret created
// schema:
// $ref: '#/definitions/SecretWithParam'
// $ref: '#/definitions/Secret'
// default:
// $ref: '#/responses/error'
func CreateTLSSecret(ctx *gin.Context) {
Expand Down Expand Up @@ -219,12 +219,12 @@ func CreateTLSSecret(ctx *gin.Context) {
// - name: body
// in: body
// schema:
// $ref: '#/definitions/SecretWithParam'
// $ref: '#/definitions/Secret'
// responses:
// '201':
// description: secret created
// schema:
// $ref: '#/definitions/SecretWithParam'
// $ref: '#/definitions/Secret'
// default:
// $ref: '#/responses/error'
func CreateDockerSecret(ctx *gin.Context) {
Expand Down Expand Up @@ -293,12 +293,12 @@ func CreateDockerSecret(ctx *gin.Context) {
// - name: body
// in: body
// schema:
// $ref: '#/definitions/SecretWithParam'
// $ref: '#/definitions/Secret'
// responses:
// '202':
// description: secret updated
// schema:
// $ref: '#/definitions/SecretWithParam'
// $ref: '#/definitions/Secret'
// default:
// $ref: '#/responses/error'
func UpdateSecret(ctx *gin.Context) {
Expand Down
128 changes: 3 additions & 125 deletions static/ab0x.go

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions static/b0x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ debug: false
custom:
# type: array of strings
- files:
- "../vendor/github.com/containerum/kube-client/swagger.json"
- "../vendor/github.com/containerum/utils/httputil/swagger.json"
- "../vendor/github.com/containerum/cherry/swagger.json"
- "../swagger.json"
# base is the path that will be removed from all files' path
# type: string
Expand Down
Loading

0 comments on commit bda3e93

Please sign in to comment.