microsoft / microsoft/typespec

Add warning when `@list` is used with no paging information

Open
#7,859 0 comments 2 reactions 2 assignees Claimed by @timotheeguerin View on GitHub
compiler:core feature triaged:core
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

We do give an error if there is no `@pageItems` describing where the paging items are but not if there is no paging information at all like this [playground](https://typespec.io/playground/?e=%40typespec%2Fopenapi3&c=QGxpc3QKb3AgdGVzdDEoKTogewogIEBwYWdlSXRlbXMgdmFsdWU6IHN0cmluZ1tdOwp9Owo%3D&options=%7B%7D&vs=%7B%7D)

We should probably validate it has at least one of the following
- a `@nextLink` (`@prevLink`, `@firstLink` and `@lastLink` all feel optional additions)
- a `@pageIndex`
- a `@continuationToken`

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.