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 multiple ids[] parameters support for GET /api/v1/crates/:id/versions #10314

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

eth3lbert
Copy link
Contributor

This allows us to return specified versions by filtering with the ids[] parameter.

@eth3lbert
Copy link
Contributor Author

We could also consider allowing ids[] to accept id or semver string (num).

Copy link
Contributor

@LawnGnome LawnGnome left a comment

Choose a reason for hiding this comment

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

The functionality LGTM. 👍

We could also consider allowing ids[] to accept id or semver string (num).

I think I'd prefer to keep those separate — while it's theoretically possible to distinguish integer IDs from semvers, it feels to me like it would be less surprising for users and future us if we didn't try to infer extra meaning from the provided values.

Which, given that, I'm not sure if ids[] is the best name for the parameter, since ID feels like it more refers to versions.id than versions.num. Naming is hard, so I don't know what's better, but maybe num[] or versions[] might be clearer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants