Skip to content

Pagination#289

Merged
mullermp merged 15 commits into
decaffrom
pagination
Apr 9, 2025
Merged

Pagination#289
mullermp merged 15 commits into
decaffrom
pagination

Conversation

@mullermp
Copy link
Copy Markdown
Contributor

@mullermp mullermp commented Apr 4, 2025

Support the paginated trait by using methods on Output for iteration.

@mullermp mullermp marked this pull request as draft April 4, 2025 18:44
@mullermp mullermp marked this pull request as ready for review April 5, 2025 21:00
Copy link
Copy Markdown
Contributor

@jterapin jterapin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lookin' good. I like that you push the filter_traits to the view shapes. That really streamlines the "View" side of things.

Comment thread gems/smithy-client/lib/smithy-client/pageable_output.rb Outdated
Comment thread gems/smithy-client/lib/smithy-client/plugins/pageable_output.rb
def initialize(options = {})
@id = options[:id]
@traits = options[:traits] || {}
@metadata = {}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We previously used this attribute in the ShapeRef class from V3.

I like that we have this around for flexibility but hard to keep track of all metadata usages over time (actually, is there a way to see all metadata usages in V3? So far, I just search for ref[: to see if there's usage but that's making an assumption that ref variable is used).

Any ideas to elevate this?

Copy link
Copy Markdown
Contributor Author

@mullermp mullermp Apr 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have this in v3 on shape too, not just shaperef. Inspect on shape will print out metadata. What specifically is the concern you have about finding usage of it? I think it's a dumping ground for anything - any plugin/handler could add context to a shape like from a custom runtime trait or something.

Comment thread gems/smithy/lib/smithy/views/client/paginators.rb Outdated
Comment thread gems/smithy-client/lib/smithy-client/pageable_output.rb
Comment thread gems/smithy/lib/smithy/views/client/paginators.rb Outdated
Comment thread gems/smithy/lib/smithy/views/client/paginators.rb Outdated
Comment thread gems/smithy/lib/smithy/views/client/schema.rb Outdated
Comment thread projections/shapes/lib/shapes/paginators.rb
Comment thread projections/weather/lib/weather/paginators.rb
Copy link
Copy Markdown
Contributor

@jterapin jterapin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢✨

@mullermp mullermp merged commit bae5730 into decaf Apr 9, 2025
14 checks passed
@mullermp mullermp deleted the pagination branch April 9, 2025 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants