Commit f228b86
Fix TypeSpec LRO operations: remove @extension, use @useFinalStateVia (#43308)
* Fix TypeSpec LRO: remove @extension, use @useFinalStateVia, GET returns 200+202
Root cause of the original bug: @extension("x-ms-long-running-operation", true)
only affects the OpenAPI document. Combined with @pollingOperation pointing
at a non-status-monitor endpoint, the SDK generators did not detect
ScenarioConfigurations.execute and ScenarioRuns.cancel as LROs, emitting
them as plain void methods.
This change:
* Removes @extension and @pollingOperation from execute/cancel.
* Adds @Azure.Core.useFinalStateVia("location") on the LRO templates in
lro-helpers.tsp so SDK generators emit proper SyncPoller/ArmOperation
methods that follow the Location header to poll for completion.
* Keeps the GET on ScenarioRun returning both 200 (final) and 202 (in
progress, with body + Location/Retry-After headers). The Location-
header polling protocol REQUIRES 202 while in progress and 200 on
completion; @lroStatus on the status field is only consulted by the
Azure-AsyncOperation status-monitor pattern, not by Location-header
polling. Uses ArmResourceRead's Response template variable per
reviewer's suggestion to express the 200|202 union.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address ScenarioRun polling response review comments
Use the built-in TypeSpec url scalar for the Location header and add explicit bounds for the Retry-After header on the in-progress polling response.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address Chaos .NET SDK API review naming comments
Add csharp client-name customizations for new public Chaos SDK model/resource names and model ARM ID fields as armResourceIdentifier so the generated .NET SDK uses ResourceIdentifier.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Format Chaos TypeSpec client customizations
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 03635f9 commit f228b86
10 files changed
Lines changed: 88 additions & 66 deletions
File tree
- specification/chaos/resource-manager/Microsoft.Chaos/Chaos
- preview
- 2024-11-01-preview
- 2026-05-01-preview
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
55 | 78 | | |
56 | 79 | | |
57 | 80 | | |
| |||
Lines changed: 3 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | | - | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
| |||
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
27 | | - | |
28 | 25 | | |
29 | 26 | | |
30 | 27 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 28 | + | |
36 | 29 | | |
37 | 30 | | |
38 | 31 | | |
| |||
67 | 60 | | |
68 | 61 | | |
69 | 62 | | |
70 | | - | |
71 | 63 | | |
72 | 64 | | |
73 | 65 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 66 | + | |
79 | 67 | | |
80 | 68 | | |
81 | 69 | | |
| |||
107 | 95 | | |
108 | 96 | | |
109 | 97 | | |
110 | | - | |
111 | 98 | | |
112 | 99 | | |
113 | 100 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 101 | + | |
119 | 102 | | |
120 | 103 | | |
121 | 104 | | |
| |||
specification/chaos/resource-manager/Microsoft.Chaos/Chaos/preview/2024-11-01-preview/openapi.json
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1290 | 1290 | | |
1291 | 1291 | | |
1292 | 1292 | | |
1293 | | - | |
| 1293 | + | |
1294 | 1294 | | |
1295 | 1295 | | |
1296 | 1296 | | |
| |||
specification/chaos/resource-manager/Microsoft.Chaos/Chaos/preview/2026-05-01-preview/openapi.json
Lines changed: 14 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
3836 | 3836 | | |
3837 | 3837 | | |
3838 | 3838 | | |
3839 | | - | |
3840 | | - | |
| 3839 | + | |
3841 | 3840 | | |
3842 | 3841 | | |
3843 | 3842 | | |
| |||
3883 | 3882 | | |
3884 | 3883 | | |
3885 | 3884 | | |
3886 | | - | |
| 3885 | + | |
3887 | 3886 | | |
3888 | 3887 | | |
3889 | 3888 | | |
3890 | 3889 | | |
3891 | 3890 | | |
3892 | 3891 | | |
3893 | | - | |
| 3892 | + | |
| 3893 | + | |
3894 | 3894 | | |
3895 | 3895 | | |
3896 | 3896 | | |
3897 | 3897 | | |
3898 | | - | |
| 3898 | + | |
| 3899 | + | |
| 3900 | + | |
3899 | 3901 | | |
3900 | 3902 | | |
3901 | 3903 | | |
| |||
5456 | 5458 | | |
5457 | 5459 | | |
5458 | 5460 | | |
| 5461 | + | |
5459 | 5462 | | |
5460 | 5463 | | |
5461 | 5464 | | |
| |||
6091 | 6094 | | |
6092 | 6095 | | |
6093 | 6096 | | |
| 6097 | + | |
6094 | 6098 | | |
6095 | 6099 | | |
6096 | 6100 | | |
| |||
6144 | 6148 | | |
6145 | 6149 | | |
6146 | 6150 | | |
| 6151 | + | |
6147 | 6152 | | |
6148 | 6153 | | |
6149 | 6154 | | |
| |||
6174 | 6179 | | |
6175 | 6180 | | |
6176 | 6181 | | |
| 6182 | + | |
6177 | 6183 | | |
6178 | 6184 | | |
6179 | 6185 | | |
| |||
7345 | 7351 | | |
7346 | 7352 | | |
7347 | 7353 | | |
| 7354 | + | |
7348 | 7355 | | |
7349 | 7356 | | |
7350 | 7357 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
421 | | - | |
| 421 | + | |
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
| 457 | + | |
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
| |||
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | 51 | | |
54 | 52 | | |
55 | 53 | | |
| |||
59 | 57 | | |
60 | 58 | | |
61 | 59 | | |
62 | | - | |
63 | 60 | | |
64 | | - | |
65 | 61 | | |
66 | 62 | | |
67 | 63 | | |
| |||
71 | 67 | | |
72 | 68 | | |
73 | 69 | | |
74 | | - | |
75 | 70 | | |
76 | 71 | | |
77 | 72 | | |
| |||
81 | 76 | | |
82 | 77 | | |
83 | 78 | | |
84 | | - | |
85 | 79 | | |
86 | 80 | | |
87 | 81 | | |
| |||
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
14 | 43 | | |
15 | 44 | | |
16 | 45 | | |
| |||
Lines changed: 13 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
14 | | - | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
23 | 28 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
45 | 35 | | |
46 | 36 | | |
47 | 37 | | |
| |||
54 | 44 | | |
55 | 45 | | |
56 | 46 | | |
57 | | - | |
58 | | - | |
59 | 47 | | |
60 | | - | |
61 | 48 | | |
62 | 49 | | |
63 | 50 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
0 commit comments