Feature/openapi#6
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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.jsonfrom Zod schemas, and run generation duringpnpm build. - Add
/openapi(Swagger UI) plus documentation links fromllms.txt/llms-full.txt. - Extend the public meeting list endpoint to accept
from/todate-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 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 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 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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.