Skip to content

Implement resource serialization #50229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

live1206
Copy link
Member

Resolves #50081

@Copilot Copilot AI review requested due to automatic review settings May 23, 2025 02:42
Copy link
Contributor

@Copilot 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 implements resource serialization for the Azure SDK by introducing a new ResourceSerializationProvider and integrating it into the resource client and output library generation.

  • Introduces a new ResourceSerializationProvider that defines serialization methods based on IJsonModel and IPersistableModel interfaces.
  • Modifies ResourceClientProvider to include the serialization provider and updates ManagementOutputLibrary to aggregate these providers.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

File Description
Azure.Generator.Management/src/Providers/ResourceSerializationProvider.cs New provider implementing serialization logic for resource data.
Azure.Generator.Management/src/Providers/ResourceCollectionClientProvider.cs Adds an empty serialization providers definition.
Azure.Generator.Management/src/Providers/ResourceClientProvider.cs Registers the new serialization provider.
Azure.Generator.Management/src/ManagementOutputLibrary.cs Aggregates serialization providers from resource clients.
Comments suppressed due to low confidence (1)

eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceSerializationProvider.cs:21

  • Typo in field name '_resoruce'; please rename it to '_resource' for clarity and consistency.
private readonly ResourceClientProvider _resoruce;

@live1206 live1206 marked this pull request as draft May 23, 2025 02:42
@github-actions github-actions bot added CodeGen Issues that relate to code generation Mgmt This issue is related to a management-plane library. labels May 23, 2025
github-merge-queue bot pushed a commit to microsoft/typespec that referenced this pull request May 23, 2025
@live1206 live1206 marked this pull request as ready for review May 23, 2025 08:24
@live1206 live1206 enabled auto-merge (squash) May 23, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CodeGen Issues that relate to code generation Mgmt This issue is related to a management-plane library.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

implement serialization for Resource
2 participants