Initial demo of swagger-typescript-api interface generation
This commit is contained in:
parent
0cd0c8d832
commit
1db1b84e8f
2 changed files with 7 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -17,6 +17,7 @@ backend/*.svg
|
|||
|
||||
/go.work.sum
|
||||
/package-lock.json
|
||||
/backend/docs/swagger.json
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue