避免与Knowledge表的content字段混淆,提高命名清晰度。
contents → resourcesContentIn → ResourceInContentOut → ResourceOutContentPatchIn → ResourcePatchInContentNode → ResourceNodesubmit_content → submit_resourceget_content → get_resourcepatch_content → patch_resourcelist_contents → list_resourcesencrypt_content → encrypt_resourcedecrypt_content → decrypt_resourcecontent_id → resource_id/api/content → /api/resourceknowhub/docs/content-storage.md → resource-storage.mdknowhub/docs/content-storage-examples.md → resource-storage-examples.mdknowhub/docs/knowledge-management.mdknowhub/docs/decisions.mdtest_resource_storage.pyRESOURCE_STORAGE_IMPLEMENTATION.md| 旧端点 | 新端点 |
|---|---|
| POST /api/content | POST /api/resource |
| GET /api/content/{content_id} | GET /api/resource/{resource_id} |
| PATCH /api/content/{content_id} | PATCH /api/resource/{resource_id} |
| GET /api/content | GET /api/resource |
# 1. 导入测试
python -c "from knowhub.server import app; print('✅ OK')"
# 2. 启动服务
uvicorn knowhub.server:app --reload
# 3. 运行测试
python test_resource_storage.py