Commit 80088d4
fix(formatter): properly escape values in untyped additionalProperties
When formatting values for untyped additionalProperties (e.g. additionalProperties: {}),
infer the schema from the Python value type so that string escaping, boolean and
number formatting are handled correctly. Previously, the fallback `f'"{v}"'` would
embed raw newlines in Go string literals, causing compile errors for values like
multi-line strings.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 1f89937 commit 80088d4
1 file changed
Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
677 | 677 | | |
678 | 678 | | |
679 | 679 | | |
680 | | - | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
681 | 705 | | |
682 | 706 | | |
683 | 707 | | |
| |||
0 commit comments