feat: generate v1 API client from OpenAPI - #62
Draft
EastSun5566 wants to merge 33 commits into
Draft
EastSun5566 wants to merge 33 commits into
EastSun5566 wants to merge 33 commits into
Conversation
Contributor
Author
EastSun5566
added this pull request to stack #64
September 26, 2026 16:54
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.

What
@hackmd/api/rawfrom the v1 OpenAPI spec with @hey-api/openapi-ts. The existingAPIclass remains the only handwritten convenience layer and delegates to generated operations; users do not need to switch clients.createdAtandlastChangedAtbeing typed asstringinstead ofnumber.description: nullto clear personal/team note metadata. Note GET descriptions remain strings.Documentation
APIand@hackmd/api/rawtypes (pnpm docs:build).master. Before the first deployment, set Settings → Pages → Build and deployment → Source: GitHub Actions in this repository.Related work
@hackmd/api/raw.Checks
HACKMD_E2E_MUTATIONS=1. The new nullable-description contract is covered by local tests.Regeneration
After the updated v1 OpenAPI spec is live at
api.hackmd.io, run fromnodejs/:Commit
spec/hackmd-openapi.jsonandsrc/generated/together, then rerun CI.Fixes #61 #60