Commit 2bfbb47
Add experimental API annotations from schema stability markers (#875)
* Add experimental API annotations from schema stability markers
Read the 'stability' field from api.schema.json and propagate it to
generated code in all four SDK languages. APIs marked as experimental
in the schema (fleet, agent, compaction) now carry appropriate
annotations in the generated output.
Changes to codegen scripts (scripts/codegen/):
- utils.ts: Add stability field to RpcMethod; add isNodeFullyExperimental helper
- csharp.ts: Emit [Experimental(Diagnostics.Experimental)] on types and API classes
- typescript.ts: Emit /** @experimental */ JSDoc on types and groups
- python.ts: Emit # Experimental comments on types and API classes, docstrings on methods
- go.ts: Emit // Experimental: comments on types and API structs
Design decisions:
- When all methods in a group are experimental, the group/class is
annotated and individual methods are not (annotation is inherited)
- Data types (request/result) for experimental methods are also annotated
- C# uses a Diagnostics.Experimental const ("GHCP001") referenced by all attributes
- SDK csproj suppresses GHCP001 internally; consumers still see warnings
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Strip trailing whitespace from Go quicktype output
Address review feedback: quicktype generates comments with trailing
whitespace which fails gofmt checks. Add a post-processing step to
strip trailing whitespace from the quicktype output before writing.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: use tabs for Go indentation and column-align struct fields
gofmt requires tab indentation (not spaces) and column-aligns struct
field declarations and composite literal keys. Updated the Go codegen
to emit tabs for all indentation and compute proper padding for field
alignment in wrapper structs and constructors.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: use multi-line if-return blocks for gofmt compatibility
gofmt expands single-line 'if err != nil { return nil, err }' into
multi-line blocks. Updated Go codegen to emit the multi-line form
directly, avoiding the gofmt diff.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: expand single-line struct defs to multi-line for gofmt
gofmt expands single-line struct definitions with semicolons into
multi-line format. Updated the Go codegen to emit API struct
definitions in multi-line format directly.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: collapse quicktype column alignment for gofmt compatibility
quicktype emits wide-spaced struct fields for column alignment, but
gofmt doesn't column-align when fields have interleaved comments.
Added post-processing to collapse excessive spacing in quicktype
struct field lines and remove trailing blank lines from quicktype
output.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: regenerate Go output with gofmt for proper formatting
Removed manual quicktype column-alignment workaround and regenerated
with Go installed locally so formatGoFile() runs gofmt properly.
This ensures the committed output exactly matches what CI produces.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 698b259 commit 2bfbb47
File tree
11 files changed
+262
-46
lines changed- dotnet
- src
- Generated
- test
- go/rpc
- nodejs/src/generated
- python/copilot/generated
- scripts/codegen
11 files changed
+262
-46
lines changed| 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 | + | |
14 | 22 | | |
15 | 23 | | |
16 | 24 | | |
| |||
427 | 435 | | |
428 | 436 | | |
429 | 437 | | |
| 438 | + | |
430 | 439 | | |
431 | 440 | | |
432 | 441 | | |
| |||
435 | 444 | | |
436 | 445 | | |
437 | 446 | | |
| 447 | + | |
438 | 448 | | |
439 | 449 | | |
440 | 450 | | |
| |||
463 | 473 | | |
464 | 474 | | |
465 | 475 | | |
| 476 | + | |
466 | 477 | | |
467 | 478 | | |
468 | 479 | | |
| |||
471 | 482 | | |
472 | 483 | | |
473 | 484 | | |
| 485 | + | |
474 | 486 | | |
475 | 487 | | |
476 | 488 | | |
| |||
495 | 507 | | |
496 | 508 | | |
497 | 509 | | |
| 510 | + | |
498 | 511 | | |
499 | 512 | | |
500 | 513 | | |
| |||
503 | 516 | | |
504 | 517 | | |
505 | 518 | | |
| 519 | + | |
506 | 520 | | |
507 | 521 | | |
508 | 522 | | |
| |||
527 | 541 | | |
528 | 542 | | |
529 | 543 | | |
| 544 | + | |
530 | 545 | | |
531 | 546 | | |
532 | 547 | | |
| |||
535 | 550 | | |
536 | 551 | | |
537 | 552 | | |
| 553 | + | |
538 | 554 | | |
539 | 555 | | |
540 | 556 | | |
| |||
547 | 563 | | |
548 | 564 | | |
549 | 565 | | |
| 566 | + | |
550 | 567 | | |
551 | 568 | | |
552 | 569 | | |
553 | 570 | | |
554 | 571 | | |
| 572 | + | |
555 | 573 | | |
556 | 574 | | |
557 | 575 | | |
| |||
560 | 578 | | |
561 | 579 | | |
562 | 580 | | |
| 581 | + | |
563 | 582 | | |
564 | 583 | | |
565 | 584 | | |
| |||
576 | 595 | | |
577 | 596 | | |
578 | 597 | | |
| 598 | + | |
579 | 599 | | |
580 | 600 | | |
581 | 601 | | |
| |||
1000 | 1020 | | |
1001 | 1021 | | |
1002 | 1022 | | |
| 1023 | + | |
1003 | 1024 | | |
1004 | 1025 | | |
1005 | 1026 | | |
| |||
1020 | 1041 | | |
1021 | 1042 | | |
1022 | 1043 | | |
| 1044 | + | |
1023 | 1045 | | |
1024 | 1046 | | |
1025 | 1047 | | |
| |||
1061 | 1083 | | |
1062 | 1084 | | |
1063 | 1085 | | |
| 1086 | + | |
1064 | 1087 | | |
1065 | 1088 | | |
1066 | 1089 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
| 217 | + | |
216 | 218 | | |
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
220 | 222 | | |
| 223 | + | |
221 | 224 | | |
222 | 225 | | |
223 | 226 | | |
| |||
232 | 235 | | |
233 | 236 | | |
234 | 237 | | |
| 238 | + | |
235 | 239 | | |
236 | 240 | | |
237 | 241 | | |
| |||
246 | 250 | | |
247 | 251 | | |
248 | 252 | | |
| 253 | + | |
249 | 254 | | |
250 | 255 | | |
251 | 256 | | |
| |||
261 | 266 | | |
262 | 267 | | |
263 | 268 | | |
| 269 | + | |
264 | 270 | | |
265 | 271 | | |
266 | 272 | | |
267 | 273 | | |
268 | 274 | | |
| 275 | + | |
269 | 276 | | |
270 | 277 | | |
271 | 278 | | |
| 279 | + | |
272 | 280 | | |
273 | 281 | | |
274 | 282 | | |
| |||
402 | 410 | | |
403 | 411 | | |
404 | 412 | | |
405 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
406 | 416 | | |
407 | 417 | | |
408 | 418 | | |
| |||
416 | 426 | | |
417 | 427 | | |
418 | 428 | | |
419 | | - | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
420 | 432 | | |
421 | 433 | | |
422 | 434 | | |
| |||
430 | 442 | | |
431 | 443 | | |
432 | 444 | | |
433 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
434 | 448 | | |
435 | 449 | | |
436 | 450 | | |
| |||
641 | 655 | | |
642 | 656 | | |
643 | 657 | | |
| 658 | + | |
644 | 659 | | |
645 | 660 | | |
646 | 661 | | |
| |||
664 | 679 | | |
665 | 680 | | |
666 | 681 | | |
| 682 | + | |
667 | 683 | | |
668 | 684 | | |
669 | 685 | | |
| |||
724 | 740 | | |
725 | 741 | | |
726 | 742 | | |
| 743 | + | |
727 | 744 | | |
728 | 745 | | |
729 | 746 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| 343 | + | |
343 | 344 | | |
344 | 345 | | |
345 | 346 | | |
346 | 347 | | |
347 | 348 | | |
348 | 349 | | |
349 | 350 | | |
| 351 | + | |
350 | 352 | | |
351 | 353 | | |
352 | 354 | | |
| |||
358 | 360 | | |
359 | 361 | | |
360 | 362 | | |
| 363 | + | |
361 | 364 | | |
362 | 365 | | |
363 | 366 | | |
| |||
378 | 381 | | |
379 | 382 | | |
380 | 383 | | |
| 384 | + | |
381 | 385 | | |
382 | 386 | | |
383 | 387 | | |
384 | 388 | | |
385 | 389 | | |
386 | 390 | | |
387 | 391 | | |
| 392 | + | |
388 | 393 | | |
389 | 394 | | |
390 | 395 | | |
| |||
405 | 410 | | |
406 | 411 | | |
407 | 412 | | |
| 413 | + | |
408 | 414 | | |
409 | 415 | | |
410 | 416 | | |
411 | 417 | | |
412 | 418 | | |
413 | 419 | | |
414 | 420 | | |
| 421 | + | |
415 | 422 | | |
416 | 423 | | |
417 | 424 | | |
| |||
432 | 439 | | |
433 | 440 | | |
434 | 441 | | |
| 442 | + | |
435 | 443 | | |
436 | 444 | | |
437 | 445 | | |
| |||
443 | 451 | | |
444 | 452 | | |
445 | 453 | | |
| 454 | + | |
446 | 455 | | |
447 | 456 | | |
| 457 | + | |
448 | 458 | | |
449 | 459 | | |
450 | 460 | | |
451 | 461 | | |
452 | 462 | | |
453 | 463 | | |
454 | 464 | | |
| 465 | + | |
455 | 466 | | |
456 | 467 | | |
457 | 468 | | |
| |||
467 | 478 | | |
468 | 479 | | |
469 | 480 | | |
| 481 | + | |
470 | 482 | | |
471 | 483 | | |
472 | 484 | | |
| |||
660 | 672 | | |
661 | 673 | | |
662 | 674 | | |
| 675 | + | |
663 | 676 | | |
664 | 677 | | |
665 | 678 | | |
666 | 679 | | |
| 680 | + | |
667 | 681 | | |
668 | 682 | | |
669 | 683 | | |
| |||
674 | 688 | | |
675 | 689 | | |
676 | 690 | | |
| 691 | + | |
677 | 692 | | |
678 | 693 | | |
679 | 694 | | |
| |||
0 commit comments