mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
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:
parent
fa89eb651c
commit
d7123aef05
4 changed files with 11 additions and 120546 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -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
|
|
@ -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"];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue