[SPE-2237] Terraform DataSources that hide Pagination Details #387
Labels
ClientSDKGeneration
Created by Linear-GitHub Sync
kong
Created by Linear-GitHub Sync
Medium priority
Created by Linear-GitHub Sync
terraform
Created by Linear-GitHub Sync
Milestone
If an "entity" was called "CatList" and returned a
{ cats: [{...cat1, ...cat2}], page: {number: 1, size: 10, total: 100}}
, from apage_number
,page_size
then we could definex-speakeasy-entity: CatList
on the cat response, andx-speakeasy-entity-operation: CatList#read
on theListCats
operation, and get a resource that lets you do:terraform "catlist_data_source" "my_data_source" {
page_number = 1
page_size = 100
}
And access
catlist_data_source.data[0].cat_details
This works right now, but exposes details about pagination to the end user of the terraform data source.
It would be better to not expose any details about pagination when using a terraform provider. E.g. through the use of https://www.speakeasyapi.dev/docs/customize-sdks/pagination, the pagination details are abstracted and the user can always iterate through the entire response body.
Hence this ticket exists to track upgrading our terraform data sources to abstract away pagination configuration and always expose all the data to a terraform user.
Potentially could use the planned
x-speakeasy-entity-operation; Cat#list
extension to activate this behaviour.From SyncLinear.com | SPE-2237
The text was updated successfully, but these errors were encountered: