Commit f5dd9e7
fix: do not invent a variant for structs that flatten one
A struct holding a flattened variant cannot derive `Default` — the untagged
enum has no default, and choosing one would invent data the same way a required
field would. The generated request builder has the same problem: it constructs
the struct field by field and has no variant to supply.
Both are now skipped when a variant is present, which is what Cloudflare,
GitHub, LaunchDarkly, and Lithic needed to compile again.
Refs #65
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TD3TSeWKu4VqLtEnRMDjry1 parent d570d98 commit f5dd9e7
2 files changed
Lines changed: 40 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2060 | 2060 | | |
2061 | 2061 | | |
2062 | 2062 | | |
2063 | | - | |
2064 | | - | |
2065 | | - | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
2066 | 2069 | | |
2067 | 2070 | | |
2068 | 2071 | | |
| |||
2085 | 2088 | | |
2086 | 2089 | | |
2087 | 2090 | | |
| 2091 | + | |
2088 | 2092 | | |
2089 | 2093 | | |
2090 | 2094 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
595 | 628 | | |
596 | 629 | | |
597 | 630 | | |
| |||
0 commit comments