Skip to content
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

Expose public APIs for Azure plugin to generate ResourceData #5544

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

Conversation

live1206
Copy link
Contributor

@live1206 live1206 commented Jan 9, 2025

Expose more public APIs:

  • StringHelpers.ToCleanName for sub-plugin
  • MrwSerializationtypeDefinition to manipulate serialization in sub-plugin
  • TypeFacotry.CreateModelCore to create ResourceData in Azure plugin

The corresponding Azure plugin PR: Azure/azure-sdk-for-net#47730

@live1206 live1206 changed the title expose StringHelpers, MrwSerializationtypeDefinition and TypeFacotry.… Expose public APIs for Azure plugin to generate Resource Jan 9, 2025
@live1206 live1206 changed the title Expose public APIs for Azure plugin to generate Resource Expose public APIs for Azure plugin to generate ResourceData Jan 9, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label Jan 9, 2025
@azure-sdk
Copy link
Collaborator

azure-sdk commented Jan 9, 2025

API change check

APIView has identified API level changes in this PR and created following API reviews.

Microsoft.Generator.CSharp
Microsoft.Generator.CSharp.ClientModel
Microsoft.Generator.CSharp.Input

@live1206 live1206 marked this pull request as ready for review January 9, 2025 08:13
private static bool IsWordSeparator(char c) => !SyntaxFacts.IsIdentifierPartCharacter(c) || c == '_';

[return: NotNullIfNotNull("name")]
public static string ToCleanName(string name, bool isCamelCase = true)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is moved from original StringExtensinos.ToCleanName.
Synced with @JoshLove-msft before, we should not expose public extension methods for BCL types, turn them into static methods intead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants