DependencyTrack / DependencyTrack/dependency-track
OpenApi "Component" schema, "directDependencies" property for GET api/v1/component/{uuid}
- Dominant language
- Java
- Stars
- 4.2k
- Forks
- 811
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 237
Description
### Current Behavior
Currently the type of directDependencies is string, holding an escaped json:
```yaml
Component:
required:
- classifier
- project
- uuid
type: object
properties:
...
directDependencies:
type: string
```
example (removed unneeded properties for posting it here):
```json
{
"publisher": "Spring IO",
"group": "org.springframework",
"name": "spring-core",
"directDependencies": "[{\"name\":\"spring-jcl\",\"purl\":\"pkg:maven/org.springframework/spring-jcl@5.3.39?type=jar\",\"uuid\":\"001f3a52-3456-4e42-9090-c410f7335394\",\"version\":\"5.3.39\",\"group\":\"org.springframework\",\"purlCoordinates\":\"pkg:maven/org.springframework/spring-jcl@5.3.39\",\"objectType\":\"COMPONENT\"}]"
}
```
### Proposed Behavior
Having a JSON-Array for that:
```json
{
"publisher": "Spring IO",
"group": "org.springframework",
"name": "spring-core",
"directDependencies": [
{
"name": "spring-jcl",
"purl": "pkg:maven/org.springframework/spring-jcl@5.3.39?type=jar",
"uuid": "001f3a52-3456-4e42-9090-c410f7335394",
"version": "5.3.39",
"group": "org.springframework",
"purlCoordinates": "pkg:maven/org.springframework/spring-jcl@5.3.39",
"objectType": "COMPONENT"
}
]
}
```
### 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 enhancement was already requested
Contributor guide
Assessment
This issue has not been assessed yet.