DependencyTrack / DependencyTrack/dependency-track
OpenAPI GET /v1/component/project/{uuid} return value incorrect
- 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
Assessment
This issue has not been assessed yet.