Skip to content

[Nitro] Serialize McpAppViewVisibility as camelCase strings#9655

Merged
glen-84 merged 1 commit into
mainfrom
gai/nitro-mcp-settings-serialization
May 8, 2026
Merged

[Nitro] Serialize McpAppViewVisibility as camelCase strings#9655
glen-84 merged 1 commit into
mainfrom
gai/nitro-mcp-settings-serialization

Conversation

@glen-84

@glen-84 glen-84 commented May 8, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 8, 2026 12:10

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

This PR updates the Nitro MCP tool settings JSON serialization so McpAppViewVisibility values are emitted as camelCase strings (e.g., "model", "app") when using the source-generated System.Text.Json context, and adds tests to validate parsing/formatting/round-tripping behavior.

Changes:

  • Register a System.Text.Json enum converter in McpSettingsSerializerContext to serialize McpAppViewVisibility as camelCase strings.
  • Add snapshot-based tests covering McpToolSettingsSerializer parse/format behavior, including visibility.
  • Change McpToolSettingsPermissions from a class to a sealed record.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/Nitro/Common/test/ChilliCream.Nitro.Adapters.Mcp.Tests/Serialization/McpToolSettingsSerializerTests.cs Adds comprehensive parse/format/round-trip tests, including snapshot expectations for camelCase JSON and visibility serialization.
src/Nitro/Common/src/ChilliCream.Nitro.Adapters.Mcp/Serialization/McpToolSettings.cs Adjusts McpToolSettingsPermissions type definition (class → sealed record).
src/Nitro/Common/src/ChilliCream.Nitro.Adapters.Mcp/Serialization/McpSettingsSerializerContext.cs Registers a custom enum converter in the source-gen context to camelCase McpAppViewVisibility values.

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

@glen-84 glen-84 merged commit 53c3e9f into main May 8, 2026
144 checks passed
@glen-84 glen-84 deleted the gai/nitro-mcp-settings-serialization branch May 8, 2026 12:22
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