Skip to content

fix: ClientGeneratorService string.Format template brace escaping#40

Merged
JusterZhu merged 1 commit into
mainfrom
fix/template-braces
May 20, 2026
Merged

fix: ClientGeneratorService string.Format template brace escaping#40
JusterZhu merged 1 commit into
mainfrom
fix/template-braces

Conversation

@JusterZhu
Copy link
Copy Markdown
Collaborator

ClientGeneratorService template uses string.Format with numbered placeholders.
C# interpolated strings inside the template had unescaped curly braces
that string.Format tried to parse as placeholders.

Fix: double-escape template curly braces so string.Format outputs
single braces in the generated .cs file.

Build: 0 errors

Copilot AI review requested due to automatic review settings May 20, 2026 15:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a runtime string.Format parsing issue in ClientGeneratorService’s code-generation templates, where C# interpolated-string braces inside the template were mistakenly treated as string.Format placeholders.

Changes:

  • Escaped interpolated-string braces in the generated log lambda within the client template.
  • Escaped interpolated-string braces in the generated log lambda within the upgrade template.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JusterZhu JusterZhu merged commit d6b9071 into main May 20, 2026
1 check passed
@JusterZhu JusterZhu deleted the fix/template-braces branch May 20, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants