Skip to content

Add missing paging attributes to DiffResponse - #9

Merged
snazy merged 1 commit into
projectnessie:mainfrom
snazy:fix-model-diff-response
Jul 6, 2023
Merged

snazy merged 1 commit into
projectnessie:mainfrom
snazy:fix-model-diff-response

Conversation

@snazy

@snazy snazy commented Jul 6, 2023

Copy link
Copy Markdown
Member

The paging attributes became part of REST API v1 a while ago, but pynessie was never updated.

@snazy
snazy requested a review from XN137 July 6, 2023 08:42

@XN137 XN137 left a comment

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.

i assume you tested this with the testcontainers wip branch

Comment thread pynessie/model.py

diffs: List[DiffEntry] = desert.ib(fields.List(fields.Nested(DiffEntrySchema(), data_key="diffs")))
has_more: bool = attr.ib(default=False, metadata=desert.metadata(fields.Bool(allow_none=True, data_key="hasMore")))
token: str = attr.ib(default=None, metadata=desert.metadata(fields.Str(allow_none=True)))

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.

are these specific to DiffResponse or are we missing a common base class for paged responses ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Never had a base-class nor "proper, generic paging support" before

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

BTW: REST API v1 doesn't actually support paging except for the commit-log.

@snazy
snazy merged commit c7d8df5 into projectnessie:main Jul 6, 2023
@snazy
snazy deleted the fix-model-diff-response branch July 6, 2023 09:31
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