One module per API area (base, files, activity, skills, conversations, notifications, forms, search, plans, projects, services, misc, diff, cron, agents) on a shared base.Schema; __init__.py re-exports every model so handlers keep writing schemas.<Name>. OpenAPI output is byte-identical. PlanSummary lives in conversations.py to keep the module graph a DAG. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
24 lines
804 B
JavaScript
24 lines
804 B
JavaScript
// Orval config — generate the frontend's API types from the backend's OpenAPI
|
|
// spec (frontend/openapi.json, itself dumped from the FastAPI app; see
|
|
// backend/schemas/). Run `npm run gen:api` after changing a backend response
|
|
// model. The generated `src/generated/` tree is committed so the Docker build
|
|
// needs no backend to type-check.
|
|
module.exports = {
|
|
aiagent: {
|
|
input: "./openapi.json",
|
|
output: {
|
|
mode: "single",
|
|
target: "./src/generated/api.ts",
|
|
schemas: "./src/generated/model",
|
|
client: "fetch",
|
|
clean: true,
|
|
prettier: false,
|
|
override: {
|
|
// Emit string unions (e.g. `"http" | "tcp"`) instead of TS enums, to
|
|
// match the hand-written union types they replace.
|
|
enumGenerationType: "union",
|
|
},
|
|
},
|
|
},
|
|
};
|