Fix swaggerdocs generation to produce actually valid output (#39)
This commit is contained in:
parent
0edc5fd315
commit
7322bfafb3
10 changed files with 104 additions and 90 deletions
3
Makefile
3
Makefile
|
|
@ -163,6 +163,9 @@ do-the-swag:
|
|||
go install $(GOFLAGS) github.com/swaggo/swag/cmd/swag; \
|
||||
fi
|
||||
swag init -g pkg/routes/routes.go;
|
||||
# Fix the generated swagger file, currently a workaround until swaggo can properly use go mod
|
||||
sed -i '/"definitions": {/a "code.vikunja.io.web.HTTPError": {"type": "object","properties": {"code": {"type": "integer"},"message": {"type": "string"}}},' docs/docs.go;
|
||||
sed -i 's/code.vikunja.io\/web.HTTPError/code.vikunja.io.web.HTTPError/g' docs/docs.go;
|
||||
|
||||
.PHONY: misspell-check
|
||||
misspell-check:
|
||||
|
|
|
|||
Reference in a new issue