You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: eng/common/knowledge/sdk-breaking-patterns.md
+29-20Lines changed: 29 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ enum FooStatusEnum
37
37
38
38
---
39
39
40
-
### 4. Model Renamed
40
+
### 2. Model Renamed
41
41
42
42
**Detection:** TypeSpec diff shows a model definition's name changed while its structure remains the same or similar. This is distinct from Pattern 5 (Model Removed) — a rename has a clear old→new mapping, while a removal has no replacement.
43
43
@@ -73,7 +73,7 @@ model NewModelName {
73
73
74
74
---
75
75
76
-
### 5. Model Removed
76
+
### 3. Model Removed
77
77
78
78
**Detection:** TypeSpec diff shows model definition deleted with no replacement. If a replacement model with similar properties exists, this is a rename — see Pattern 4 (Model Renamed) instead.
**Detection:** TypeSpec diff shows property name changed, or changelog shows renamed getter/setter.
128
128
@@ -147,11 +147,11 @@ model DeprecatedModel {
147
147
148
148
---
149
149
150
-
### 8. Operation Renamed
150
+
### 6. Operation Renamed
151
151
152
152
**Detection:** TypeSpec diff shows operation name changed, or changelog shows paired method removal + addition. This is distinct from Pattern 10 (Operation Removed) — a rename has a clear old→new mapping, while a removal has no replacement.
153
153
154
-
**How to distinguish from Pattern 10:** If a method disappears from the changelog AND a new method with similar parameters/return type appears, this is a rename (Pattern 8). If a method disappears with no replacement, that's a removal (Pattern 10).
154
+
**How to distinguish from Pattern 8:** If a method disappears from the changelog AND a new method with similar parameters/return type appears, this is a rename (Pattern 6). If a method disappears with no replacement, that's a removal (Pattern 8).
**Detection:** TypeSpec diff shows operation deleted or `@removed` decorator added, with no replacement operation. If a replacement operation with similar parameters exists, this is a rename — see Pattern 8 (Operation Renamed) instead.
217
+
**Detection:** TypeSpec diff shows operation deleted or `@removed` decorator added, with no replacement operation. If a replacement operation with similar parameters exists, this is a rename — see Pattern 6 (Operation Renamed) instead.
209
218
210
219
**Per-Language Impact:**
211
220
-**All languages:** ❌ Breaking — method no longer exists in client
212
221
-**Go:** Cannot be resolved through client customizations
213
222
214
-
**Mitigation:**
223
+
**typespec pattern:**
215
224
```typespec
216
225
// In main.tsp — use version gating instead of deletion
217
226
@removed(Versions.v2026_07_01)
@@ -220,7 +229,7 @@ op oldOperation(): void;
220
229
221
230
---
222
231
223
-
### 11. Combine multiple model properties into one
232
+
### 9. Combine multiple model properties into one
224
233
225
234
**Detection:** TypeSpec diff shows that one or more properties in a model are combined into a new model, and a new property of that model is added.
226
235
@@ -233,7 +242,7 @@ op oldOperation(): void;
233
242
234
243
---
235
244
236
-
### 12. Interface Renamed (DataPlane only)
245
+
### 10. Interface Renamed (DataPlane only)
237
246
238
247
**Detection:** TypeSpec diff shows interface name changed.
0 commit comments