Initial demo of swagger-typescript-api interface generation

This commit is contained in:
Imbus 2024-03-29 15:58:36 +01:00
parent 0cd0c8d832
commit 1db1b84e8f
2 changed files with 7 additions and 0 deletions

1
.gitignore vendored
View file

@ -17,6 +17,7 @@ backend/*.svg
/go.work.sum
/package-lock.json
/backend/docs/swagger.json
# Test binary, built with `go test -c`
*.test

View file

@ -104,6 +104,12 @@ default: build
docs:
swag init -outputTypes go
api: ./docs/swagger.json
npx swagger-typescript-api --path ./docs/swagger.json --output ../frontend/src/API --name GAPI.ts
./docs/swagger.json:
swag init -outputTypes json
.PHONY: docfmt
docfmt:
swag fmt