Skip to content

[http-client-csharp] ToIdentifierName is too strict #10053

@ArcturusZhang

Description

@ArcturusZhang

We have a ToIdentifierName and ToVariableName which converts the input names from typespec into our C# identifiers in generated code.
Now, these two methods will trim off underscores in the name.
But in some cases, we need underscore to stay in the identifier, the most common case is the name of an enum member, such as Tls_1_0.

Can we update this method to make it accept an extra argument so that from downstream we could allow to add clientName to enum members to rename them to a name with underscore?

Metadata

Metadata

Labels

emitter:client:csharpIssue for the C# client emitter: @typespec/http-client-csharp

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions