$skipToken is replaced with $skip when $compute is used
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 505
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
Assemblies affected
ASP.NET Core OData 8.x
Describe the bug
NextLink does not have $skipToken even when configured, but instead has $skip when a $compute expression is used in the request.
Reproduce steps
- Enable SkipToken for your controllers.
- Hit your API service with a
$computeexpression:
http://localhost:2000/beta/students?$orderby=lowername&$compute=tolower(name) as lowername
Data Model
public class Student
{
[Key]
public string Id {get; set;}
public string Name {get; set;}
}
EDM (CSDL) Model
<EntityType Name="Student">
<Key>
<PropertyRef Name="id" />
</Key>
<Property Name="id" Type="Edm.String" Nullable="false" />
<Property Name="name" Type="Edm.String" Nullable="false" />
</EntityType>
Request/Response
http://localhost:2000/beta/students?$orderby=lowername&$compute=tolower(name) as lowername
Expected behavior
NextLink in the response should have a $skipToken, but it instead has a $skip.
Screenshots
NA
Additional context
- The default SkipToken handler is used.
- The same code returns a
$skipTokenwhen used without the$computeexpression and even with just the$orderbyexpression.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the request using the default SkipToken handler with $orderby and $compute, then compare the generated NextLink with the behavior without $compute. Trace the pagination and NextLink generation path; done means the response retains $skipToken when $compute is present, without regressing the existing cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100