get_typescript_definition
Generate strict TypeScript interfaces and types from Pydantic models, FastAPI applications, or live OpenAPI URLs to keep frontend types in sync.
Instructions
Generate strict TypeScript interfaces and types from a Pydantic model, FastAPI app, or live OpenAPI URL.
Args: target: Target identifier (e.g. 'models.user:UserProfile', 'main:app', 'https://api.example.com/openapi.json'). project_dir: Optional path to the project root directory.
Returns: TypeScript interface/type definitions code as a string, or an error dictionary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | ||
| project_dir | No |