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

Make About extensible and add extension for database info #565

Merged
merged 2 commits into from
May 15, 2024

Conversation

nscuro
Copy link
Collaborator

@nscuro nscuro commented May 14, 2024

Introduces an SPI that applications can use to provide additional data to be exposed via /api/version.

Adds an extension for database information.

This came from a requirement in Dependency-Track, where users want insight into what database they're running on: DependencyTrack/dependency-track#2093

Example response of /api/version for Dependency-Track:

{
    "version": "4.12.0-SNAPSHOT",
    "timestamp": "2024-05-14T18:33:19Z",
    "framework": {
        "version": "2.2.6-SNAPSHOT",
        "timestamp": "2024-05-14T18:32:59Z",
        "name": "Alpine",
        "uuid": "d7a6b868-13a3-4bbd-909d-a7780a9a6b8f"
    },
    "application": "Dependency-Track",
    "systemUuid": "21e013b8-8a51-4314-ac38-bed8cdde21c9",
    "uuid": "d1bf53e9-3a1a-4cd5-b65d-e969b51e9840",
    "database": {
        "productVersion": "2.2.224 (2023-09-17)",
        "productName": "H2"
    }
}

nscuro added 2 commits May 14, 2024 20:44
Introduces an SPI that applications can use to provide additional data to be exposed via `/api/version`.

Signed-off-by: nscuro <[email protected]>
Example response of `/api/version` for Dependency-Track:

```json
{
    "version": "4.12.0-SNAPSHOT",
    "timestamp": "2024-05-14T18:33:19Z",
    "framework": {
        "version": "2.2.6-SNAPSHOT",
        "timestamp": "2024-05-14T18:32:59Z",
        "name": "Alpine",
        "uuid": "d7a6b868-13a3-4bbd-909d-a7780a9a6b8f"
    },
    "application": "Dependency-Track",
    "systemUuid": "21e013b8-8a51-4314-ac38-bed8cdde21c9",
    "uuid": "d1bf53e9-3a1a-4cd5-b65d-e969b51e9840",
    "database": {
        "productVersion": "2.2.224 (2023-09-17)",
        "productName": "H2"
    }
}
```

Signed-off-by: nscuro <[email protected]>
@stevespringett stevespringett merged commit 2e0b946 into stevespringett:master May 15, 2024
2 checks passed
@nscuro nscuro deleted the extensible-about branch May 15, 2024 16:46
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.

2 participants