foojayio / discoapi

The foojay discovery api (discoapi) is made to discover java packages (jre/jdk) from different distributions.
GNU General Public License v2.0
115 stars 14 forks source link

Both of jdk and jre package types should be concerned for Kona #106

Closed johnshajiang closed 3 months ago

johnshajiang commented 3 months ago

The below API lists the Kona jdk and jre packages, even though the package_type is jdk. https://api.foojay.io/disco/v3.0/packages?package_type=jdk&latest=available&version=8&operating_system=linux&architecture=x64&distribution=kona

{
  "result":[
    {
      "id":"65b8fde24e38f7b45061d0543271562e",
      "archive_type":"tar.gz",
      "distribution":"kona",
      "major_version":8,
      "java_version":"8.0.422",
      "distribution_version":"8.0.422",
      "jdk_version":8,
      "latest_build_available":true,
      "release_status":"ga",
      "term_of_support":"lts",
      "operating_system":"linux",
      "lib_c_type":"glibc",
      "architecture":"x64",
      "fpu":"unknown",
      "package_type":"jdk",
      "javafx_bundled":false,
      "directly_downloadable":true,
      "filename":"TencentKona8.0.19.b1_jre_linux-x86_64_8u422.tar.gz",
      "links":{
        "pkg_info_uri":"https://api.foojay.io/disco/v3.0/ids/65b8fde24e38f7b45061d0543271562e",
        "pkg_download_redirect":"https://api.foojay.io/disco/v3.0/ids/65b8fde24e38f7b45061d0543271562e/redirect"
      },
      "free_use_in_production":true,
      "tck_tested":"unknown",
      "tck_cert_uri":"",
      "aqavit_certified":"unknown",
      "aqavit_cert_uri":"",
      "size":41737799,
      "feature":[

      ]
    },
    ...
    ...
  ],
  "message":"3 package(s) found"
}

Here TencentKona8.0.19.b1_jre_linux-x86_64_8u422.tar.gz is JRE, but not JDK.

If package_type is jre, no package is listed, like the below,

{
  "result":[

  ],
  "message":"No package(s) found"
}
johnshajiang commented 3 months ago

I just submitted PR #107 for fixing this issue. Please review this PR.

johnshajiang commented 3 months ago

The fix from PR #107 just was merged. The commit: https://github.com/foojayio/discoapi/commit/50febee8e4a4c39a8e372bad35b71dc79b0c5217