Skip to content

Commit e3643cc

Browse files
authored
chore: Add automatic api doc generation (#1397)
Fixes: HDX-2888
1 parent c1b45ab commit e3643cc

File tree

6 files changed

+1794
-5
lines changed

6 files changed

+1794
-5
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ packages/app/.vercel
3535
packages/app/coverage
3636
packages/app/out
3737

38-
# OpenAPI spec
39-
packages/public/openapi.json
40-
4138
# optional npm cache directory
4239
**/.npm
4340

.husky/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env sh
2+
set -e
3+
24
. "$(dirname -- "$0")/_/husky.sh"
35

46
npx lint-staged

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@
4141
"release": "npx changeset tag && npx changeset publish"
4242
},
4343
"lint-staged": {
44+
"packages/api/src/routers/external-api/**/*.ts": [
45+
"prettier --write --ignore-unknown",
46+
"eslint --fix --quiet",
47+
"sh -c 'cd packages/api && yarn run docgen && git add openapi.json'"
48+
],
4449
"**/*.{ts,tsx}": [
4550
"prettier --write --ignore-unknown",
4651
"eslint --fix --quiet"

0 commit comments

Comments
 (0)