Summary
Summary
Build a throwaway, high-fidelity experiment of the standalone Worker shape from the mock playground ADR so we can measure the actual surface area of the change before committing to a direction.
In this shape, the mock API is its own small Cloudflare Worker, deployed separately from the docs site. The docs site stays static on GitHub Pages and calls the Worker cross-origin.
This is one of two paired experiments (see companion ticket for Option 3B). The goal is not to productionize — it's to answer "what would we actually be signing up for?" for each option, using the same rubric, so we can pick one and move forward. Expect this PR to close unmerged if we choose the other direction.
Data layer: start from the website's existing sample-data generator (generateSchemaExample() in src/lib/schema/example-generator.ts, which runs openapi-sampler over the JSON schemas and powers the examples on the models pages) rather than the hand-authored fixture. Reuse keeps the mock in sync with the schemas by construction. Fall back to the #1049 fixture/handlers only where the generator can't deliver. Note the generator reads files at build time, so samples likely need pre-generating and bundling — confirm.
Dependencies: the Cloudflare account/token switch to the org account (separate ticket). A *.workers.dev URL is sufficient here; the custom domain (mock.commongrants.org) depends on the DNS migration and is out of scope.
Acceptance criteria
Acceptance criteria
Summary
Summary
Build a throwaway, high-fidelity experiment of the standalone Worker shape from the mock playground ADR so we can measure the actual surface area of the change before committing to a direction.
In this shape, the mock API is its own small Cloudflare Worker, deployed separately from the docs site. The docs site stays static on GitHub Pages and calls the Worker cross-origin.
This is one of two paired experiments (see companion ticket for Option 3B). The goal is not to productionize — it's to answer "what would we actually be signing up for?" for each option, using the same rubric, so we can pick one and move forward. Expect this PR to close unmerged if we choose the other direction.
Data layer: start from the website's existing sample-data generator (
generateSchemaExample()insrc/lib/schema/example-generator.ts, which runsopenapi-samplerover the JSON schemas and powers the examples on the models pages) rather than the hand-authored fixture. Reuse keeps the mock in sync with the schemas by construction. Fall back to the #1049 fixture/handlers only where the generator can't deliver. Note the generator reads files at build time, so samples likely need pre-generating and bundling — confirm.Dependencies: the Cloudflare account/token switch to the org account (separate ticket). A
*.workers.devURL is sufficient here; the custom domain (mock.commongrants.org) depends on the DNS migration and is out of scope.Acceptance criteria
Acceptance criteria
curlcommand, and from the TS SDK returns identical data