Skip to content

Expose Method "type/kind" for ScmMethodProvider #8037

@jorgerangel-msft

Description

@jorgerangel-msft

Original discussion: openai/openai-dotnet#549 (comment)

It has been a common scenario to have to check the type of method when using a visitor to mutate a ScmMethodProvider instance. Rather than having the consumer adding logic to decide if a method is a client method, we should consider exposing an API on ScmMethodProvider to signal what kind of client method it is: ie: Protocol, Convenience, CreateRequest.

We could consider making this type public https://github.com/microsoft/typespec/blob/main/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/RestClientProvider.cs#L777-L782

Metadata

Metadata

Assignees

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