verification
use it
# add to stunt.yaml
services:
gdocs:
adapter: embedded:gdocs-style
# then
$ stunt upThe embedded: source extracts this adapter from the binary — no git clone, fully offline.
how to mock the Google Docs API locally
Install stunt, paste the service block above into stunt.yaml, run stunt up — then point your client at localhost instead of Google Docs API. It works offline, keeps state across requests and restarts, and every response is synthetic: the route shapes, status codes, pagination, and webhook delivery follow the real Google Docs API v1 surface — the data is fake, the behavior is real.
backing stores
documents
api surface (5)
generated from the adapter manifest — exactly what boots, nothing more · covers 100% of the real API's 3 routes (derived from sdk google-api-go-client @ v0.293.0)
5 routes
POST/v1/documents
GET/v1/documents/{documentId}/revisions
POST/v1/documents/{documentId}:batchUpdate
POST/v1/documents/{documentId}/batchUpdate
GET/v1/documents/{documentId}
SDK-verified behaviors (5)
- ✓Documents.Create returns documentId + title
- ✓Documents.Get returns the structural body model
- ✓batchUpdate insertText applies and replies 1:1
- ✓batchUpdate applies ordered requests at indexes
- ✓Unknown document Get -> googleapi 404
Not implemented (3)
- Tables, headers/footers, suggestions, and writeControl not modeled
- Most batchUpdate request types absent: replaceAllText, replaceImage, named ranges
- No createTable or other table requests (insertTableRow, updateTableCellStyle)
Differs from the real API (5)
- batchUpdate replies map 1:1 to requests; real API may return fewer
- batchUpdate also served at the legacy slash form (documents/{id}/batchUpdate)
- GET revisions endpoint is extra-API; the real Docs API v1 has none
- Inserted text adopts the style of the run it lands in
- Inserting newline continues bullet/named style into the new paragraph
want more of the Google Docs API surface? adapters are YAML + Starlark — the authoring guide covers adding routes, fixtures, and state machines. Open an issue for anything big first, or just file a PR — merged routes ship in the next release.