DependencyTrack / DependencyTrack/dependency-track

OpenAPI GET /v1/component/project/{uuid} return value incorrect

Open
#3,608 4 comments 0 reactions 0 assignees View on GitHub
api docs defect p3
Dominant language
Java
Stars
4.2k
Forks
811
Avg merge
8h 39m
Merged PRs (30d)
237

Description

### Current Behavior

The OpenAPI definition promises an `array` of `#/definitions/Component`. The returned values don't look like the Component definition. They lack fields such as _sha256_ and include fields such as _repositoryMeta_.

See https://github.com/DependencyTrack/client-go/issues/26 and #2604

### Steps to Reproduce

1. `curl -v -H "X-API-Key: $DT_API_KEY" -H "Accept: application/json" localhost:8080/api/v1/component/project/$MY_PROJ_UUD | jq ".[0] | keys"`

### Expected Behavior

I would like to know if the current value is intended and I may use it in scripts. If so, I would like `curl mydt:8080/api/swagger.json` to return the schema of the data.

### Dependency-Track Version

4.10.1

### Dependency-Track Distribution

Container Image

### Database Server

N/A

### Database Server Version

_No response_

### Browser

N/A

### Checklist

- [X] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/dependency-track/blob/master/CONTRIBUTING.md#filing-issues)
- [X] I have checked the [existing issues](https://github.com/DependencyTrack/dependency-track/issues) for whether this defect was already reported

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.