Skip to content

feat: add node export API for Markdown and HTML formats - #1818

Open
qianeric-backup wants to merge 1 commit into
chaitin:mainfrom
qianeric-backup:feat/node-export-api
Open

feat: add node export API for Markdown and HTML formats#1818
qianeric-backup wants to merge 1 commit into
chaitin:mainfrom
qianeric-backup:feat/node-export-api

Conversation

@qianeric-backup

Copy link
Copy Markdown

Summary

Add node export API that allows users to export knowledge base nodes in Markdown or HTML format with automatic format conversion.

Changes

  • Add NodeExportReq struct with id, kb_id, and format parameters
  • Implement ExportNode usecase method with format conversion support
  • Add convertHTMLToMarkdown helper for HTML to Markdown conversion
  • Add ExportNode handler with proper validation and error handling
  • Register GET /api/v1/node/export endpoint

API Usage

GET /api/v1/node/export?id={node_id}&kb_id={kb_id}&format=md
GET /api/v1/node/export?id={node_id}&kb_id={kb_id}&format=html

Test Plan

  • Test Markdown format export
  • Test HTML format export
  • Test automatic format conversion
  • Test invalid parameter handling

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.

1 participant