foojayio / discoapi

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

API Discoverability #17

Closed jonatan-ivanov closed 3 years ago

jonatan-ivanov commented 3 years ago

Some API discoverability would be great for the foojay APIs, e.g.: GET https://api.foojay.io/

[
    {
        "id": "disco",
        "name": "Disco API",
        "links": {
            "self": "https://api.foojay.io/disco/"
        }
    },
    {
        "id": "swagger-ui",
        "name": "Swagger UI",
        "links": {
            "self": "https://api.foojay.io/swagger-ui/"
        }
    }
]

GET https://api.foojay.io/disco/

[
    {
        "id": "1.0",
        "name": "1.0",
        "links": {
            "self": "https://api.foojay.io/disco/1.0/"
        }
    }
]

And so on...

Also, some hypermedia support between the APIs would be great (e.g.: links.download):

[
    {
        "id": "ca8969b39e4707d3a8a4f45c30738c95",
        "archive_type": "tar.gz",
        "distribution": "zulu",
        "major_version": 15,
        "java_version": "15.0.2",
        "distribution_version": "15.29.15",
        "latest_build_available": true,
        "release_status": "ga",
        "term_of_support": "mts",
        "operating_system": "linux",
        "lib_c_type": "glibc",
        "architecture": "x64",
        "package_type": "jdk",
        "javafx_bundled": false,
        "directly_downloadable": true,
        "filename": "zulu15.29.15-ca-jdk15.0.2-linux_x64.tar.gz",
        "ephemeral_id": "328ca8969b39e4707d3a8a4f45c30738c951614192036",
        "links": {
            "download": "https://api.foojay.io/disco/v1.0/ephemeral_ids/328ca8969b39e4707d3a8a4f45c30738c951614192036"
        }
    }
]
HanSolo commented 3 years ago

Good points… 👍🏻

HanSolo commented 3 years ago

Added both points and will close this issue as soon as the code will be into production