Support the full v1 API through the generated API client
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- openapi, typescript
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 176
- Forks
- 13
- Merge medio
- 4 h 35 min
- PR fusionados (30 d)
- 4
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de hackmdio/hackmd-cli
-
Config commandAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
hackmdio/hackmd-cli#45 · 2 comentarios ·
-
login problemAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
hackmdio/hackmd-cli#108 · 1 comentario ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
hackmdio/hackmd-cli#105 · 1 reacción ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
hackmdio/hackmd-cli#89 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
hackmdio/hackmd-cli#87 ·
Todos los issues de hackmdio/hackmd-cli
Issues similares
-
area/frontend good first issue kind/cooldown
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
voidzero-dev/oxc-angular-compiler#511 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
langchain-ai/deepagentsjs#898 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
anomalyco/models.dev#8509 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug documentation P2 UI/UX
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día