feat(google): Calendar discovery document endpoint#55
Open
yonatangross wants to merge 3 commits intovercel-labs:mainfrom
Open
feat(google): Calendar discovery document endpoint#55yonatangross wants to merge 3 commits intovercel-labs:mainfrom
yonatangross wants to merge 3 commits intovercel-labs:mainfrom
Conversation
Add GET /discovery/v1/apis/calendar/v3/rest serving a minimal discovery
document that describes the Calendar routes this emulator implements:
calendarList.list, events.list, events.insert, events.delete, and
freebusy.query.
This enables google-api-python-client build("calendar", "v3") and
similar SDK bootstrapping to work against the emulator without hitting
the real Google API.
- No auth required (matches real Google behavior)
- rootUrl dynamically reflects the server origin
- 2 files changed, +117 lines
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
@yonatangross is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 122108ea80
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Address Codex review feedback on PR vercel-labs#55: - Add baseUrl and basePath to discovery doc (required by Python/JS SDKs) - Add singleEvents and showDeleted to events.list parameters - Match real Google title ("Calendar API") and description - Add events.list query params: timeMin, timeMax, maxResults, pageToken, q, orderBy (P2 review feedback) - Update README.md with discovery endpoint listing (P1 review feedback) - Add baseUrl/basePath assertions to test Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove unused `escapeAttr` import - Prefix unused `redirect_uri` with underscore (token endpoint parses it but doesn't validate it against the auth request — separate issue) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9f86639 to
7515255
Compare
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.
Summary
GET /discovery/v1/apis/calendar/v3/restendpoint to the Google emulatorgoogle-api-python-client build("calendar", "v3")and similar SDK bootstrapping against the emulatorChanges
routes/calendar.tsgoogle.test.tsHow it works
The endpoint returns a static JSON document following the Google Discovery format:
{ "kind": "discovery#restDescription", "name": "calendar", "version": "v3", "rootUrl": "http://localhost:4005/", "servicePath": "calendar/v3/", "resources": { "calendarList": { "methods": { "list": {...} } }, "events": { "methods": { "list": {...}, "insert": {...}, "delete": {...} } }, "freebusy": { "methods": { "query": {...} } } } }rootUrlis dynamic — it reflects the server's actual origin so SDK clients connect to the right host.Test plan
GET /discovery/v1/apis/calendar/v3/restreturns 200kind,name,version,idfieldsrootUrlreflects server origin🤖 Generated with Claude Code