-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Problem
No API versioning exists. This causes:
- Breaking changes affect all clients
- No deprecation path
- Difficult upgrade experience
Current State
GET /tasks
POST /tasks/{id}/run
Proposed Solution
GET /v1/tasks
POST /v1/tasks/{id}/run
Implementation
func SetupRoutes(mux *http.ServeMux) {
// API v1
v1 := http.NewServeMux()
v1.HandleFunc("/tasks", handleTasks)
v1.HandleFunc("/tasks/{id}", handleTask)
// ...
mux.Handle("/v1/", http.StripPrefix("/v1", v1))
// Future: API v2
// mux.Handle("/v2/", http.StripPrefix("/v2", v2))
}Acceptance Criteria
- All endpoints prefixed with
/v1/ - Old endpoints redirect with deprecation warning
- API version in response headers
- Documentation includes version
- Migration guide for existing clients
Versioning Policy
| Change Type | Version Impact |
|---|---|
| New endpoint | Minor (1.x) |
| New optional field | Minor (1.x) |
| Breaking change | Major (2.0) |
| Bug fix | Patch (1.0.x) |
References
- Evaluation Report Section: 1.1 API Design Quality
Reactions are currently unavailable