Repository navigation
feat: OpenAPI docs with a Scalar reference at /docs - #41
Merged
Merged
Conversation
Every route now carries a hono-openapi describeRoute, kept in an openapi.ts beside its handlers. GET /openapi.json serves the generated OpenAPI 3.1 document and GET /docs renders it with Scalar, on prod and dev. A unit test fails on any route without docs. The Hono app moves from src/index.ts to src/app.ts so tests can read its route table; index.ts keeps the Sentry wrapper, cron, and DO exports.
leviFrosty
added a commit
that referenced
this pull request
Oct 16, 2026
- feat: account handoff relay and encrypted backups - fix: keep the HERE key and queries out of Sentry spans - perf: keep OpenRouter and serial KV reads off the status path - feat: account/info for reading your own account - feat: OpenAPI docs with a Scalar reference at /docs (#41) - feat: add arabic to the shared contact page - feat: self-host app updates on cloudflare - fix: restore notes import on azure (#38) - feat: read paper note pages for Notes Import - feat: switch Notes Import to GPT-6 Luna on Azure
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.
Adds a public API reference:
/docs(Scalar) rendering/openapi.json(OpenAPI 3.1), on prod and dev.hono-openapidescribeRoute, kept in anopenapi.tsbeside its handlers (src/notesImport/,src/buddies/,src/accounts/,src/routePlanning/,src/openapi/coreDocs.ts). Shared helpers, the error envelope, and shared error components live insrc/openapi/schemas.ts.openapi.tsin the same PR (noted in AGENTS.md).src/openapi/openapi.test.tsfails on any undocumented route, or an operation without a tag, summary, or responses.{p, s}envelope and list the decodedpfields as a table.src/app.tsso tests can read its route table;src/index.tskeeps Sentry, cron, and the DO exports. No runtime behavior changes.Verified:
tsc, 731 unit tests,wrangler deploy --dry-run(prod + dev, 582 KiB gzip), the verify loop (doctor, 38 e2e tests,fuzz:buddies300 cases ok), and/docsrendered locally.Doc writing turned up some contract drift between the code and
docs/buddies-protocol.md(documented as the code behaves):suspended(403) andunknown_account(404) are missing from the protocol's error table; live close code 4003 isn't listed either.inbox/registeralso returnsaccountIdonce linked, and accepts the optionalaccountproof.claimSecretoninvite/claimis 401bad_signature.device/registerrow in the protocol's ops table is garbled.too_many_challenges(429) sends noRetry-After, unlike the shared envelope's promise.🤖 Generated with Claude Code