openapi-client
Regenerate a typed TypeScript API client for the Next.js frontends from the .NET OpenAPI document, keeping OpenAPI as the source of truth.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Regenerate a typed TypeScript API client for the Next.js frontends from the .NET OpenAPI document, keeping OpenAPI as the source of truth.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Launch the full Zach Hair Studio stack locally — the .NET API plus the Next.js frontends — for development and manual verification.
Add and apply EF Core migrations against BookingDbContext, including the one-time switch off EnsureCreated() so migrations own the schema.
Scaffold a new backend feature mirroring the Features/Bookings pattern (entity, DTOs, mappers, DbSet, controller) plus a starter Next.js page.
| name | openapi-client |
| description | Regenerate a typed TypeScript API client for the Next.js frontends from the .NET OpenAPI document, keeping OpenAPI as the source of truth. |
The .NET API exposes an OpenAPI document; the frontends should consume a typed
client generated from it rather than hand-written, drifting fetch calls.
http://localhost:5236/openapi/v1.jsonUse a generator already common in the Next.js ecosystem, e.g.
openapi-typescript for
types + a thin fetch client:
# from landing-page/
npx -y openapi-typescript http://localhost:5236/openapi/v1.json \
-o lib/api/schema.d.ts
Add a small typed fetch wrapper in landing-page/lib/api/client.ts (e.g. using
openapi-fetch) that points at the API base URL. Repeat for dashboard/ once
it exists.
lib/api/ in each frontend.NEXT_PUBLIC_API_BASE_URL,
defaulting to http://localhost:5236).lib/api/schema.d.ts regenerates without errors and tsc/next build
passes.