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
|
/go.work.sum
|
||||||
/package-lock.json
|
/package-lock.json
|
||||||
|
/backend/docs/swagger.json
|
||||||
|
|
||||||
# Test binary, built with `go test -c`
|
# Test binary, built with `go test -c`
|
||||||
*.test
|
*.test
|
||||||
|
|
|
@ -104,6 +104,12 @@ default: build
|
||||||
docs:
|
docs:
|
||||||
swag init -outputTypes go
|
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
|
.PHONY: docfmt
|
||||||
docfmt:
|
docfmt:
|
||||||
swag fmt
|
swag fmt
|
||||||
|
|
Loading…
Reference in a new issue