Skip to content

[Feature Request] Ability to reorder and default parameters in customization #1274

Open

Description

Describe the issue or request

Today, there isn't great support for reordering and setting defaults without wrapping the generated API yourself.

Describe your ideas for solutions

Run generator as-is. I get:

public virtual Task<Response> SendToUserAsync(string userId, string contentType, RequestContent requestBody, RequestOptions requestOptions = null);

Add an override file with:

    public class WebPubSubService
    {
        [Operation("WebPubSubService_SendToUser")]
        public extern virtual Task<Response> SendToUserAsync(string userId, RequestContent requestBody, string contentType = "application/json", RequestOptions requestOptions = null);
    }

Which tells the generator to rearrange parameters and default one of them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

customizationAutoRest C# language generator customization option.feature-requestThis issue requires a new behavior in the product in order be resolved.v3Version 3 of AutoRest C# generator.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions