Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPE-2237] Terraform DataSources that hide Pagination Details #387

Open
ThomasRooney opened this issue Jan 8, 2024 · 1 comment
Open
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

Comments

@ThomasRooney
Copy link
Member

If an "entity" was called "CatList" and returned a { cats: [{...cat1, ...cat2}], page: {number: 1, size: 10, total: 100}}, from a page_number, page_size then we could define x-speakeasy-entity: CatList on the cat response, and x-speakeasy-entity-operation: CatList#read on the ListCats 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

@ThomasRooney ThomasRooney added ClientSDKGeneration Created by Linear-GitHub Sync kong Created by Linear-GitHub Sync Medium priority Created by Linear-GitHub Sync labels Jan 8, 2024
@ThomasRooney
Copy link
Member Author

@ThomasRooney i'm going to remove this from the V2 release.

@ThomasRooney ThomasRooney modified the milestones: v.82, v.83 Jan 17, 2024
@ThomasRooney ThomasRooney modified the milestones: v.83, v.86 Feb 14, 2024
@ThomasRooney ThomasRooney modified the milestones: v.86, v.89, v.90 Mar 6, 2024
@ThomasRooney ThomasRooney modified the milestones: v.90, v.91 Mar 20, 2024
@ThomasRooney ThomasRooney added the terraform Created by Linear-GitHub Sync label Mar 24, 2024
@ThomasRooney ThomasRooney modified the milestones: v.91, v.92, v.93 Mar 27, 2024
@ThomasRooney ThomasRooney modified the milestones: v.93, v.94 Apr 10, 2024
@ThomasRooney ThomasRooney modified the milestones: v.94, v.95, v.96 Apr 17, 2024
@ThomasRooney ThomasRooney modified the milestones: v.96, v.97, v.98 May 1, 2024
@ThomasRooney ThomasRooney modified the milestones: v.106, v.107, v.108 Jul 10, 2024
@ThomasRooney ThomasRooney modified the milestones: v.108, v.109, v.110 Jul 24, 2024
@ThomasRooney ThomasRooney modified the milestones: v.110, v.111 Aug 7, 2024
@ThomasRooney ThomasRooney modified the milestones: v.111, v.112, v.113 Aug 14, 2024
@ThomasRooney ThomasRooney modified the milestones: v.113, v.114 Aug 28, 2024
@ThomasRooney ThomasRooney modified the milestones: v.114, v.115, v.116 Sep 4, 2024
@ThomasRooney ThomasRooney modified the milestones: v.116, v.117 Sep 18, 2024
@ThomasRooney ThomasRooney modified the milestones: v.117, v.118, v.119 Sep 25, 2024
@ThomasRooney ThomasRooney modified the milestones: v.119, v.120, v.121 Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant