Skip to content

Fix json schema for update sdk details input so serialization does no…#11957

Merged
praveenkuttappan merged 4 commits into
Azure:mainfrom
praveenkuttappan:fix_update_sdk_details_info
Sep 3, 2025
Merged

Fix json schema for update sdk details input so serialization does no…#11957
praveenkuttappan merged 4 commits into
Azure:mainfrom
praveenkuttappan:fix_update_sdk_details_info

Conversation

@praveenkuttappan
Copy link
Copy Markdown
Member

Incoming JSON schema from GitHub copilot has language and packageName as properties and this causes failure when deserializing it and language and package name are empty for all objects.

Copilot AI review requested due to automatic review settings September 3, 2025 23:34
@github-actions github-actions Bot added the azsdk-cli Issues related to Azure/azure-sdk-tools::tools/azsdk-cli label Sep 3, 2025
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

This PR fixes a JSON deserialization issue in the Azure SDK release plan tool where incoming JSON schema uses different property casing than expected. The fix ensures that both camelCase (language, packageName) and PascalCase (Language, PackageName) property names are properly handled during deserialization.

  • Adds JSON property name attributes to the SDKInfo model for consistent serialization
  • Implements string replacement logic to normalize property casing before deserialization
  • Adds test coverage to verify the fix works with both casing formats

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
ReleasePlanTool.cs Adds string replacement logic to normalize JSON property casing and updates method documentation
ReleasePlanDetails.cs Adds JsonPropertyName attributes to SDKInfo properties for consistent JSON serialization
ReleasePlanToolTests.cs Adds test case to verify the fix handles both camelCase and PascalCase JSON inputs

Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/ReleasePlan/ReleasePlanTool.cs Outdated
Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli/Models/ReleasePlanDetails.cs Outdated
@praveenkuttappan praveenkuttappan enabled auto-merge (squash) September 3, 2025 23:49
Copy link
Copy Markdown
Member

@scbedd scbedd left a comment

Choose a reason for hiding this comment

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

Much better 👍

@praveenkuttappan praveenkuttappan merged commit 321c0e8 into Azure:main Sep 3, 2025
13 checks passed
@praveenkuttappan praveenkuttappan deleted the fix_update_sdk_details_info branch September 4, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

azsdk-cli Issues related to Azure/azure-sdk-tools::tools/azsdk-cli

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants