-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
Some operation is not technically pageable but we should generate them as pageable, ListSinglePage is one of them.
Real case: https://github.com/Azure/azure-rest-api-specs/blob/b971916ccce7a87579348051c9cef6433ff40a82/specification/attestation/resource-manager/Microsoft.Attestation/Attestation/AttestationProvider.tsp#L91
one of the solution for this is that, when we see an operation has a kind of list, we make it pageable anyway.
Considering it would be so complicated to make an operation pageable in the generator and in some cases it might be problematic, therefore we are relying on the @markAsPageable decorator in TCGC to do this.
In our generator, we will detect list resource operations, and assert they are pageable, otherwise we give diagnostic errors to give hints to our customers that they should add this decorator to solve this issue.