- Updated service template structure in `ARCHITECTURE.md` and `README.md` for clarity and usability. - Enhanced bilingual documentation across skills, increasing the number of available skills from 15 to 25. - Added new sections on event-driven architecture, inter-service communication, and performance optimization. - Improved formatting and removed outdated references to streamline the documentation experience.
47 lines
1.7 KiB
Markdown
47 lines
1.7 KiB
Markdown
# Chiến Lược Versioning API (API Versioning Strategy)
|
|
|
|
API versioning strategies for GoodGo microservices including semantic versioning, backward compatibility patterns, API deprecation, version negotiation, and breaking changes handling.
|
|
> Các chiến lược versioning API cho GoodGo microservices bao gồm semantic versioning, backward compatibility patterns, API deprecation, version negotiation, và xử lý breaking changes.
|
|
|
|
## Tổng Quan
|
|
|
|
API versioning strategies enable managing API evolution while maintaining compatibility and clearly communicating changes to consumers.
|
|
|
|
Các chiến lược versioning API cho phép quản lý sự phát triển API đồng thời duy trì tương thích và giao tiếp rõ ràng các thay đổi tới consumers.
|
|
|
|
## Khi Nào Sử Dụng
|
|
|
|
Use this skill when versioning APIs, handling breaking changes, or implementing deprecation.
|
|
|
|
Sử dụng skill này khi versioning APIs, xử lý breaking changes, hoặc implement deprecation.
|
|
|
|
## Các Patterns Chính
|
|
|
|
### URL Path Versioning / Versioning Theo Đường Dẫn
|
|
|
|
```typescript
|
|
// EN: Version routes
|
|
// VI: Routes theo version
|
|
router.use('/v1', v1Router);
|
|
router.use('/v2', v2Router);
|
|
```
|
|
|
|
### Deprecation / Deprecation
|
|
|
|
```typescript
|
|
// EN: Deprecation headers
|
|
// VI: Headers deprecation
|
|
res.setHeader('Deprecation', 'true');
|
|
res.setHeader('Sunset', '2024-12-31');
|
|
```
|
|
|
|
## Best Practices / Thực Hành Tốt
|
|
|
|
1. Choose strategy and be consistent / Chọn chiến lược và nhất quán
|
|
2. Use semantic versioning / Sử dụng semantic versioning
|
|
3. Always deprecate before removing / Luôn deprecate trước khi xóa
|
|
|
|
## Tài Nguyên
|
|
|
|
- Skill Source: `.cursor/skills/api-versioning-strategy/SKILL.md`
|