Skip to content

Skip untyped internal properties in C# codegen - #2298

Merged
stephentoub merged 1 commit into
mainfrom
stephentoub-skip-unmappable-internal-properties
Aug 9, 2026
Merged

Skip untyped internal properties in C# codegen#2298
stephentoub merged 1 commit into
mainfrom
stephentoub-skip-unmappable-internal-properties

Conversation

@stephentoub

Copy link
Copy Markdown
Collaborator

@github/copilot 1.0.79-9 adds internal, in-process-only properties without JSON Schema types. The C# generator currently attempts to map every property to a C# type, causing dependency-update codegen to fail.

Clone and preprocess the RPC schema before generation, recursively omitting only internal properties that have no representable schema shape. Typed internal properties continue to be generated, and untyped public properties still fail validation.

Validated generation against the exact 1.0.79-9 API and session-event schemas. Other language generators remain unchanged because they already tolerate these shapes.

Generated by Copilot

Remove internal properties without a representable schema shape before C# RPC generation, while preserving typed internal properties and strict failures for public schemas.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 510b87fe-e424-4389-a811-2a4c3a2181ff
Copilot AI balanced review requested due to automatic review settings August 9, 2026 12:08
@stephentoub
stephentoub requested a review from a team as a code owner August 9, 2026 12:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds C# schema preprocessing so code generation tolerates untyped internal-only RPC properties without weakening public-schema validation.

Changes:

  • Clones RPC schemas before preprocessing.
  • Recursively removes untyped internal properties.
Show a summary per file
File Description
scripts/codegen/csharp.ts Adds internal-property filtering before RPC generation.

Review details

Tip

Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread scripts/codegen/csharp.ts
@stephentoub
stephentoub merged commit 243ca39 into main Aug 9, 2026
26 checks passed
@stephentoub
stephentoub deleted the stephentoub-skip-unmappable-internal-properties branch August 9, 2026 12:11
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