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

[BUG] Project Dependencies API returns dependencies for wrong "latest" version #2910

Open
Instein98 opened this issue Mar 7, 2022 · 0 comments

Comments

@Instein98
Copy link

Description

At the Doc of the Project Dependencies API, it says pass latest to get dependency info for the latest available version. However, dependency info of the wrong latest version is returned.

Steps

GET https://libraries.io/api/maven/org.assertj:assertj-core/latest/dependencies?api_key=my_key

I run the command curl -H "Accept: application/json" -H "Content-Type: application/json" -X GET "https://libraries.io/api/maven/org.assertj:assertj-core/latest/dependencies?api_key=my_key" to get the dependency informations of the latest version of org.assertj:assertj-core.

Expected Behavior

Return the dependency informations of the version 3.22.0 (latest version) of org.assertj:assertj-core

Observed Behavior

Return the dependency informations of the version 3.9.1 of org.assertj:assertj-core

The result is like:

{
    ...
    "latest_release_number": "3.22.0",
    ...
    "name": "org.assertj:assertj-core",
    ...
    "dependencies_for_version": "3.9.1",
    "dependencies": ...
}

Comments

It looks like libraries.io wrongly takes the last element in the versions array of org.assertj:assertj-core as the latest version. the versions array is sorted in alphabetical order where 3.22.0 is placed before 3.9.1 and 3.9.1 is the last element.

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

No branches or pull requests

1 participant