Skip to content

Feature/openapi#6

Merged
kleinlennart merged 3 commits into
devfrom
feature/openapi
Jun 22, 2026
Merged

Feature/openapi#6
kleinlennart merged 3 commits into
devfrom
feature/openapi

Conversation

@kleinlennart

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings June 22, 2026 20:44
@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
transcripts Ready Ready Preview, Comment Jun 22, 2026 8:44pm

Request Review

@kleinlennart kleinlennart merged commit 36acaf2 into dev Jun 22, 2026
4 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a generated OpenAPI 3.0 spec for the public data API, serves an interactive Swagger UI page, and updates the meeting list endpoint to support date ranges.

Changes:

  • Generate and commit public/openapi.json from Zod schemas, and run generation during pnpm build.
  • Add /openapi (Swagger UI) plus documentation links from llms.txt / llms-full.txt.
  • Extend the public meeting list endpoint to accept from/to date-range filters.

Reviewed changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
scripts/generate-openapi.ts New build-time script that writes the generated OpenAPI spec to public/openapi.json.
public/openapi.json Generated OpenAPI 3.0.3 document for the public API.
proxy.ts Excludes /openapi from next-intl middleware matching so it remains locale-free.
package.json Runs OpenAPI generation as part of pnpm build; adds generate-openapi script.
lib/openapi/spec.ts Builds the OpenAPI document (paths + components) and converts Zod JSON Schema to OAS 3.0 nullable semantics.
lib/openapi/schemas.ts Defines Zod schemas used as the basis for OpenAPI component schemas (and query schema definitions).
app/openapi/route.ts Serves Swagger UI HTML at /openapi.
app/llms.txt/route.ts Adds a discovery link to /openapi.json and /openapi.
app/llms-full.txt/route.ts Documents from/to params and adds a machine-readable spec section.
app/api/waitlist/route.ts Adds a brief route header comment.
app/api/videos/route.ts Adds a brief route header comment.
app/api/transcripts/route.ts Adds a brief route header comment.
app/api/transcripts/check/route.ts Adds a brief route header comment.
app/api/transcripts/[id]/words/route.ts Adds a brief route header comment.
app/api/transcripts/[id]/route.ts Adds a brief route header comment.
app/api/transcripts/[id]/analysis/route.ts Adds a brief route header comment.
app/api/subscriptions/video/route.ts Adds a brief route header comment.
app/api/subscriptions/route.ts Adds a brief route header comment.
app/api/subscriptions/feed/route.ts Adds a brief route header comment.
app/api/speakers/statements/route.ts Adds a brief route header comment.
app/api/pv/route.ts Adds a brief route header comment.
app/api/pv/align/route.ts Adds a brief route header comment.
app/api/og/meeting/[...slug]/route.tsx Refactors OG image layout markup and adds a header comment.
app/api/languages/route.ts Adds a brief route header comment.
app/api/health/route.ts Adds a brief route header comment.
app/api/data/[locale]/[format]/[...path]/route.ts Adds from/to parsing for meeting list queries; reorders imports; minor formatting change.
app/api/cron/sync-videos/route.ts Adds a brief route header comment.
app/api/cron/send-transcript-notifications/route.ts Adds a brief route header comment.
app/api/cron/realign/route.ts Adds a brief route header comment.
app/api/cron/process-scheduled/route.ts Adds a brief route header comment.
app/api/cron/liveness-sweep/route.ts Adds a brief route header comment.
app/api/cron/check-pv/route.ts Adds a brief route header comment.
app/api/auth/verify/route.ts Adds a brief route header comment.
app/api/auth/request-link/route.ts Adds a brief route header comment.
app/api/auth/me/route.ts Adds a brief route header comment.
app/api/auth/logout/route.ts Adds a brief route header comment.

Comment on lines +5 to +7
// Regenerates public/openapi.json from the Zod schemas. Wired into `prebuild`
// so the spec stays in sync on every `pnpm build`; run directly via
// `pnpm generate-openapi`.
Comment thread lib/openapi/schemas.ts
Comment on lines +3 to +11
// Zod schemas that are the single source of truth for the public data API's
// request parameters and response shapes. `scripts/generate-openapi.ts` feeds
// these through `z.toJSONSchema()` to assemble `public/openapi.json`.
//
// This module is intentionally dependency-free (no `next/server`, no DB
// imports) so it runs under `tsx` in the `prebuild` step without dragging in
// the server runtime. That's also why the locale list is duplicated as a
// literal here rather than imported from `i18n/routing` — keep this graph
// pure.
Comment thread lib/openapi/spec.ts
Comment on lines +216 to +225
"/{locale}/meetings.txt": {
get: {
tags: ["meetings"],
summary: "Browse or search meetings (plain text)",
description:
"Same data as `meetings.json` in a compact, LLM-friendly plain-text " +
"table. Accepts the same query parameters.",
operationId: "listMeetingsText",
parameters: [localeParam],
responses: {
Comment on lines 377 to 386
const dateRaw = sp.get("date");
const date =
dateRaw && /^\d{4}-\d{2}-\d{2}$/.test(dateRaw) ? dateRaw : undefined;
const fromRaw = sp.get("from");
const dateFrom =
fromRaw && /^\d{4}-\d{2}-\d{2}$/.test(fromRaw) ? fromRaw : undefined;
const toRaw = sp.get("to");
const dateTo =
toRaw && /^\d{4}-\d{2}-\d{2}$/.test(toRaw) ? toRaw : undefined;
const docs = sp
Comment thread app/openapi/route.ts
Comment on lines +11 to +16
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swagger-ui-dist@5/swagger-ui.css" />
<style>body { margin: 0; }</style>
</head>
<body>
<div id="swagger-ui"></div>
<script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@5/swagger-ui-bundle.js"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants