Skip to content

Commit fd7a56b

Browse files
authored
Include gitignored OpenAPI specs as Turbo inputs to fix stale client generation (#856)
### Summary & Motivation Fix stale frontend API client generation caused by Turbo not detecting changes to gitignored OpenAPI spec files. After the recent removal of `*.Api.json` files from version control, Turbo's cache no longer detected when the backend regenerated these specs, causing `dev:setup` and `build` tasks to skip re-running `openapi-typescript`. This resulted in the frontend loading a stale `api.generated.d.ts` with missing types and API paths. - Add `shared/lib/api/*.Api.json` as explicit Turbo inputs alongside `$TURBO_DEFAULT$` for both `build` and `dev:setup` tasks, so Turbo includes the gitignored OpenAPI specs in its cache hash and invalidates correctly when the backend regenerates them ### Checklist - [x] I have added tests, or done manual regression tests - [x] I have updated the documentation, if necessary
2 parents 2cded78 + a978455 commit fd7a56b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

application/turbo.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"globalEnv": ["CERTIFICATE_PASSWORD"],
44
"tasks": {
55
"build": {
6+
"inputs": ["$TURBO_DEFAULT$", "shared/lib/api/*.Api.json"],
67
"outputs": ["dist/**", "tests/test-results/**"],
78
"dependsOn": ["^build"]
89
},
@@ -18,6 +19,7 @@
1819
},
1920
"dev:setup": {
2021
"dependsOn": ["^dev:setup"],
22+
"inputs": ["$TURBO_DEFAULT$", "shared/lib/api/*.Api.json"],
2123
"outputs": ["dist/**"]
2224
},
2325
"lint": {

0 commit comments

Comments
 (0)