Support the full v1 API through the generated API client
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- openapi, typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 176
- Fork
- 13
- Merge medio
- 6h 3m
- PR unite (30g)
- 3
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hackmdio/hackmd-cli
-
Config commandAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
hackmdio/hackmd-cli#45 · 2 commenti ·
-
login problemAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
hackmdio/hackmd-cli#108 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
hackmdio/hackmd-cli#105 · 1 reazione ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
hackmdio/hackmd-cli#89 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
hackmdio/hackmd-cli#87 ·
Tutte le issue di hackmdio/hackmd-cli
Issue simili
-
Add: PRO TV Chisinau SDApertacheck:failed streams:add
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
iptv-org/iptv#53974 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
interledger/rafiki#3986 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Doist/todoist-cli#576 ·
I maintainer di solito rispondono entro 1 giorno
-
Suggestion: document (or optionally add) a cheaper-model config for find-skills on Claude CodeApertafeature
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
vercel-labs/skills#2370 ·
I maintainer di solito rispondono entro 1 giorno
-
🐛 Bug supabase/cli
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno