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

Add pagination to GET Package endpoint #284

Merged
merged 11 commits into from
Oct 19, 2024

Conversation

BruDriguezz
Copy link
Contributor

Closes #91

@BruDriguezz BruDriguezz requested review from a team as code owners July 15, 2024 16:04
Copy link
Contributor

@jonathan-d-zhang jonathan-d-zhang left a comment

Choose a reason for hiding this comment

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

This change will cause the response model of the endpoint to change, right? have you made sure that bot will not break because of this?

tests/test_package.py Outdated Show resolved Hide resolved
src/mainframe/endpoints/package.py Outdated Show resolved Hide resolved
Copy link
Contributor

@jonathan-d-zhang jonathan-d-zhang left a comment

Choose a reason for hiding this comment

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

lgtm

Robin5605
Robin5605 previously approved these changes Oct 10, 2024
Copy link
Contributor

@Robin5605 Robin5605 left a comment

Choose a reason for hiding this comment

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

pretty much exactly what i was going for, thanks!

src/mainframe/endpoints/package.py Outdated Show resolved Hide resolved
Bruno Rodrigues dos Santos and others added 2 commits October 10, 2024 18:48
Signed-off-by: Bruno Rodrigues dos Santos <[email protected]>
Pyright can't infer that lookup_package_info returns a Page if `page`
and `size` are passed in, and returns a Sequence otherwise.
Using an isinstance check instead of checking `page` and `size` gets us
partway, however the generic type information for Page[T] is lost within
this type guard, so we must still ignore type checking a bit to prevent
"varaiable is of unknown type" errors.
@Robin5605 Robin5605 merged commit 9dd8584 into vipyrsec:main Oct 19, 2024
6 checks passed
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.

Add pagination for GET /package
4 participants