Skip to content

Fix Collision In Generated Paging Operations #10023

@jorgerangel-msft

Description

@jorgerangel-msft

Consider this tsp:

interface Foo {
  @route("/list")
@doc("List things with nextlink")
@convenientAPI(true)
@list
op List(): {
  @pageItems
  things: Thing[];

  @nextLink next?: url;
};

@route("/listAll")
@doc("List things with nextlink")
@convenientAPI(true)
@list
op ListAll(): {
  @pageItems
  things: Thing[];

  @nextLink next?: url;
};
}

The generator does internal renaming of operations named "List" to "GetAll". In doing so, this causes a collision in the generated code for this sample since both operations would end up having the same name.

Metadata

Metadata

Assignees

No one assigned

    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