关于 api-changelog-versioning
面向维护 API 文档与兼容策略的开发者,提供变更日志、弃用计划和版本支持政策的组织方法,并包含迁移指南模板。
主要功能
- 01按版本记录 API 变更
- 02标记破坏性变更
- 03制定弃用时间表
- 04定义版本支持状态
- 05提供迁移指南模板
适用场景
- 01发布 API 版本变更说明
- 02规划旧版本的弃用与停止支持
- 03指导用户迁移 API 响应格式
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ secondsky/ claude-skills --skill api-changelog-versioning安装后在 Claude Code 中输入/api-changelog-versioning确认已加载。
详细介绍
API 变更日志与版本管理
记录 API 变更,并提供清晰的迁移路径和弃用时间表。
变更日志结构
# API Changelog
## v3.0.0 (2025-01-15) - Breaking Changes
### Breaking Changes
- Response format now follows JSON:API specification
- Authentication switched from API tokens to JWT Bearer
### Migration Steps
1. Update base URL to `/api/v3`
2. Replace `Authorization: Token xxx` with `Authorization: Bearer xxx`
3. Update response parsing for new envelope format
## v2.5.0 (2024-12-01) - Features
### New Features
- Webhook support for order events
- Batch operations endpoint
- Field filtering via `?fields=` parameter
### Improvements
- 56% faster response times on /products
- Enhanced error messages with field-specific suggestions
弃用时间表
| 版本 | 状态 | 支持截止时间 |
|---|---|---|
| v3.x | 当前 | 完整支持 |
| v2.x | 维护 | 2025-06-01 |
| v1.x | 生命周期结束 | 不支持 |
版本支持政策
- 当前:完整支持,提供新功能
- 维护:仅修复错误和安全问题
- 生命周期结束:不提供支持,从文档中移除
迁移指南模板
## Migrating from v2 to v3
### Before (v2)
```json
{ "user_name": "john" }
之后(v3)
{ "data": { "type": "user", "attributes": { "name": "john" } } }
步骤
- 将 SDK 更新到 v3.x
- 修改响应处理程序
- 在预发布环境中测试
- 更新生产环境
## Best Practices
- Provide 3-6 months deprecation notice
- Include before/after code examples
- Mark breaking changes prominently
- Maintain backward compatibility when feasible
- Version via URL path (`/api/v1/`) for clarity
评论
支持 Markdown