Add command to generate swagger docs

This commit is contained in:
kolaente 2020-09-01 18:21:14 +02:00
parent a911c3d6f7
commit 96fada53ff
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 161 additions and 341 deletions

View File

@ -53,6 +53,8 @@ var (
Aliases = map[string]interface{}{
"integration-test": IntegrationTest,
"fmt-check": FmtCheck,
"do-the-swag": DoTheSwag,
"got-swag": GotSwag,
}
)
@ -254,7 +256,8 @@ func Lint() {
}
func DoTheSwag() {
checkAndInstallGoTool("swag", "github.com/swaggo/swag/cmd/swag")
runAndStreamOutput("swag", "init", "-g", "./pkg/routes/routes.go", "--parseDependency", "-d", RootPath, "-o", RootPath+"/pkg/swagger")
}
func GotSwag() {

View File

@ -6157,7 +6157,6 @@ var doc = `{
}
},
"definitions": {
"code.vikunja.io.web.HTTPError": {"type": "object","properties": {"code": {"type": "integer"},"message": {"type": "string"}}},
"afero.File": {
"type": "object"
},

File diff suppressed because it is too large Load Diff