microsoft / microsoft/typespec

Fix Collision In Generated Paging Operations

Open
#10,023 0 comments 0 reactions 0 assignees View on GitHub
emitter:client:csharp
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.