# GENERATED FILE — DO NOT EDIT BY HAND. # # Produced by `pnpm generate:openapi` (`scripts/generate-openapi.ts`) from # this template's Zod schemas via `zod-openapi` — colidevs' code-first # OpenAPI standard (hefesto ADR 0040, superseding ADR 0005's Apidog-first # design mandate; see `.claude/rules/api-design-apidog.md`). To change this # document, edit the Zod schemas (`src/v1/modules/**/types.ts`, # `src/v1/res/problem-schema.ts`) and/or the route wiring in # `scripts/generate-openapi.ts`, then re-run the generator. # # `pnpm generate:openapi:check` (wired into # `.github/workflows/api-standard.yml`) fails the build the moment this # file drifts from a fresh regeneration — ADR 0040's 2026-08-31 addendum. openapi: 3.1.0 info: title: "{{name}}" version: 1.0.0 description: Minimal starter spec for this template's existing endpoints, generated from its Zod schemas (ADR 0040). Extend the schema/route modules this script imports as the project's real API contract grows — never hand-edit this file. servers: - url: /api/v1 paths: /healthcheck/status: get: operationId: getHealthcheckStatus summary: Application-level healthcheck status security: [] responses: "200": description: Healthcheck status message content: application/json: schema: $ref: "#/components/schemas/HealthcheckStatusResponse" default: description: Unexpected error content: application/problem+json: schema: $ref: "#/components/schemas/Problem" /me: get: operationId: getMe summary: Current authenticated caller description: Returns the caller's own identity, resolved from the Better Auth session (`src/lib/auth.ts` / `src/v1/middlewares/auth.ts`). Requires both a valid session cookie AND the service-to-service static key (`x-service-key`) — see the `sessionCookie`/`apiKeyAuth` security schemes. security: - sessionCookie: [] apiKeyAuth: [] responses: "200": description: The authenticated caller's identity content: application/json: schema: $ref: "#/components/schemas/MeResponse" "401": description: Missing or invalid session content: application/problem+json: schema: $ref: "#/components/schemas/Problem" default: description: Unexpected error content: application/problem+json: schema: $ref: "#/components/schemas/Problem" components: schemas: HealthcheckStatusResponse: type: object properties: msg: type: string description: Healthcheck status message example: V1 Healthcheck Status OK ✅ required: - msg additionalProperties: false MeResponse: type: object properties: id: type: string example: usr_01hz8p7q9k2m3n4p5q6r7s8t9u email: type: string format: email pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$ example: jane@example.com required: - id - email additionalProperties: false Problem: type: object properties: type: type: string format: uri-reference description: A URI reference identifying the problem type. example: https://coli.dev/errors/not-found status: type: integer minimum: -9007199254740991 maximum: 9007199254740991 example: 404 title: type: string example: Resource not found. detail: example: Resource not found. order 1 type: string instance: example: /api/v1/orders/1 type: string errors: type: array items: type: object properties: field: type: string example: email message: type: string example: must be a valid email required: - field - message additionalProperties: false required: - type - status - title additionalProperties: false securitySchemes: sessionCookie: type: apiKey in: cookie name: better-auth.session_token bearerAuth: type: http scheme: bearer bearerFormat: JWT apiKeyAuth: type: apiKey in: header name: x-service-key