add OpenAPI spec#7
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 and exposes interactive Swagger UI docs, while also extending meeting search with date-range filtering.
Changes:
- Add Zod-backed OpenAPI spec builder + a build-time generator script that writes
public/openapi.json. - Add
/openapiSwagger UI route and link it from the LLM discovery docs; update middleware matching to keep/openapilocale-free. - Extend meeting list/search to accept
from/to(inclusive date range) parameters and document them.
Reviewed changes
Copilot reviewed 36 out of 36 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/generate-openapi.ts | New script to generate public/openapi.json from the TypeScript spec builder. |
| public/openapi.json | Generated OpenAPI 3.0.3 document checked into public/ for serving at /openapi.json. |
| proxy.ts | Excludes /openapi from locale middleware matching. |
| package.json | Adds generate-openapi and runs it during build. |
| lib/openapi/spec.ts | Builds the OpenAPI document and converts Zod JSON Schema output to OAS 3.0-compatible schemas. |
| lib/openapi/schemas.ts | Defines Zod schemas used as the source for OpenAPI component schemas. |
| app/openapi/route.ts | Serves a Swagger UI HTML page at /openapi. |
| app/llms.txt/route.ts | Adds a discovery link to the OpenAPI spec. |
| app/llms-full.txt/route.ts | Documents from/to params and adds a “Machine-readable spec” section. |
| app/api/data/[locale]/[format]/[...path]/route.ts | Adds from/to parsing and passes them into queryVideos. |
| app/api/og/meeting/[...slug]/route.tsx | Refactors OG image JSX layout/styling (no API behavior change). |
| app/api/**/route.ts (multiple) | Adds top-of-file comments describing endpoint intent. |
Comment on lines
+42
to
+45
| if (s.type === "null") { | ||
| const { type: _t, ...rest } = s; | ||
| return { nullable: true, ...rest }; | ||
| } |
Comment on lines
401
to
405
| daysBack: LIST_DAYS_BACK, | ||
| date, | ||
| dateFrom, | ||
| dateTo, | ||
| category: sp.get("category") || undefined, |
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
+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.