refactor: gitignore generated openapi files, keep only alias types

- Add openapi.json and api.generated.ts to .gitignore (generated locally)
- Remove UnblockKeyResponse alias (backend missing return type annotation)
- Update key-management.ts comments to explain the generate workflow
This commit is contained in:
Ryan Crabbe 2026-03-20 09:21:51 -07:00
parent fa89eb651c
commit d7123aef05
4 changed files with 11 additions and 120546 deletions

6
.gitignore vendored
View file

@ -101,4 +101,8 @@ STABILIZATION_TODO.md
**/test-results
**/playwright-report
**/*.storageState.json
**/coverage
**/coverage
# Generated OpenAPI types (regenerate with: cd ui/litellm-dashboard && npm run generate:all)
ui/litellm-dashboard/openapi.json
ui/litellm-dashboard/src/types/api.generated.ts

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,8 @@
/**
* Key management types — generated from the backend OpenAPI schema.
* Key management types — derived from the backend OpenAPI schema.
*
* To regenerate: `npm run generate:all` from ui/litellm-dashboard/
* Depends on api.generated.ts which is gitignored.
* Run `npm run generate:all` from ui/litellm-dashboard/ to generate it.
*/
import type { components, paths } from "./api.generated";
@ -11,6 +12,7 @@ export type BlockKeyResponse =
paths["/key/block"]["post"]["responses"]["200"]["content"]["application/json"];
// -- /key/unblock --
// Note: unblock_key is missing a return type annotation on the backend,
// so UnblockKeyResponse resolves to `unknown`. Fix: add
// `-> Optional[LiteLLM_VerificationToken]` to the unblock_key endpoint.
export type UnblockKeyRequest = components["schemas"]["BlockKeyRequest"]; // same request model
export type UnblockKeyResponse =
paths["/key/unblock"]["post"]["responses"]["200"]["content"]["application/json"];