Skip to content

feat: generate v1 API client from OpenAPI - #62

Draft
EastSun5566 wants to merge 30 commits into
developfrom
feature/dev-3165
Draft

EastSun5566 wants to merge 30 commits into
developfrom
feature/dev-3165

Conversation

@EastSun5566

@EastSun5566 EastSun5566 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

What

  • Generate @hackmd/api/raw from the v1 OpenAPI spec while keeping the existing API class compatible.
  • Cover all 59 v1 operations and fix retry isolation.
  • Derive public response types from OpenAPI, correcting handwritten mistakes such as note createdAt and lastChangedAt being typed as string instead of number.

Documentation

  • TypeDoc builds a static API reference from the public API and @hackmd/api/raw types (pnpm docs:build).
  • The Pages workflow deploys it on pushes to master. Before the first deployment, set Settings → Pages → Build and deployment → Source: GitHub Actions in this repository.

Related work

  • CLI PR #119 adds generic v1 commands using @hackmd/api/raw.

Checks

  • Generated-code check, typecheck, 111 unit tests, build, and TypeDoc pass.
  • All 12 existing live E2E tests pass against production with HACKMD_E2E_MUTATIONS=1.

Before marking ready

  • Wait for the hackmd OpenAPI update, then refresh the vendored spec and regenerate.

Fixes #61 #60

@EastSun5566 EastSun5566 changed the title feat: generate v1 API client from OpenAPI (DEV-3165) feat: generate v1 API client from OpenAPI Sep 24, 2026
@EastSun5566

Copy link
Copy Markdown
Contributor Author

types gen docs:

Screenshot 2026-09-26 at 1 56 02 AM

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.

Generate the Node.js API client from the v1 OpenAPI spec

1 participant