Skip to content

feat: self-hosted API docs page at / and /docs - #9

Merged
ronaldtse merged 1 commit into
mainfrom
feat/api-docs-page
Aug 27, 2026
Merged

feat: self-hosted API docs page at / and /docs#9
ronaldtse merged 1 commit into
mainfrom
feat/api-docs-page

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Summary

  • the API's webpage is deployed content of the worker itself: GET /docs (always HTML) and GET / with content negotiation — browsers get the docs page, API clients keep the existing JSON directory unchanged
  • self-contained HTML (inline CSS, system fonts, no external assets): endpoint table, quick-start curl, OpenAPI/model/project links
  • api.interscript.org becomes self-describing; deployed docs live in this repo per the deployment-content ownership rule

Test plan

  • content negotiation + /docs tests (TDD: red -> green)
  • 25/25 suite, typecheck, lint, format, build
  • e2e re-run against staging after deploy

Comment thread src/docs.ts
<section>
<h2>Machine-readable</h2>
<p class="links">
<a href="${esc(openapiPath)}">OpenAPI 3.1</a>
@ronaldtse
ronaldtse merged commit 4c19cc5 into main Aug 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants