Support the full v1 API through the generated API client
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- openapi, typescript
調査の方向性
Begin with the proposed api operations, api describe, and api call entry points, then inspect the generated client's vendored OpenAPI spec and @hackmd/api/raw. Confirm the API client version includes /raw and the registry before implementing. Done means existing commands still work and the new API entry handles the listed request, response, and error cases against a local server.
索引モデルが issue の本文から書いたものです。
説明
Why
The CLI has useful notes and folders commands, but adding a dedicated command for every v1 endpoint would duplicate the API client and leave coverage gaps.
Design
Keep all existing commands and add one generic api entry:
api operationsandapi describe <OperationId>read the installed API client registry offline. They do not claim that a connected EE server supports every operation.api call <OperationId>delegates to@hackmd/api/raw, using the existing token and endpoint settings. Accept explicit--path,--query,--header, JSON--body, and multipart--fileoptions.- Print the response body by default;
--includealso shows status and headers. Handle empty responses, 207, NDJSON, and HTTP errors. Do not automatically retry writes.
This follows the GitHub CLI gh api design: dedicated commands for common workflows, plus a generic API entry for broader coverage. We borrow the interface idea, but delegate requests to the API client rather than adding another HTTP transport.
Generate the operation registry from the API client's vendored OpenAPI spec. Do not download a spec at CLI runtime or add another HTTP transport.
Example
# GitHub CLI: a focused command and a generic API entry
gh issue list --repo OWNER/REPO
gh api repos/OWNER/REPO/issues --include
# HackMD CLI: the same two-layer idea
hackmd-cli notes --noteId=abc
hackmd-cli api describe GetNote
hackmd-cli api call GetNote --path noteId=abc --include
Before release
This depends on the HackMD OpenAPI update and the API client PR. Publish a new API client version with /raw and the registry, then pin it in the CLI.
Reference
hmd is another reference for operation discovery and generic HackMD API commands. It reads OpenAPI at runtime; our CLI instead uses the installed API client's generated registry and raw operations.
- 主要言語
- TypeScript
- スター
- 176
- フォーク
- 13
- 平均マージ
- 4時間 35分
- マージ済み PR(30日)
- 4
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hackmdio/hackmd-cli のほかの issue
-
Config commandオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
hackmdio/hackmd-cli#45 · コメント 2 件 ·
-
login problemオープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
hackmdio/hackmd-cli#108 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
hackmdio/hackmd-cli#105 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
hackmdio/hackmd-cli#89 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
hackmdio/hackmd-cli#87 ·
hackmdio/hackmd-cli の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
lichess-org/api#678 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
PostHog/posthog.com#20628 ·
メンテナーはふだん 1 日以内に返信
-
bug status:Needs Triage
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
jupyterlab/jupyterlab#19964 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
agentscope-ai/QwenPaw#8064 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area: notebooks-jupyter bug theme: new notebook frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
posit-dev/positron#16347 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信