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

dtrack.Component's structure is different the output of GET /api/v1/component/project/{uuid} #26

Open
esnible opened this issue Apr 5, 2024 · 0 comments

Comments

@esnible
Copy link

esnible commented Apr 5, 2024

ComponentService.GetAll() returns (p Page[Component], err error). The structure of client-go's dtrack.Component is not the same as what the API server returns (although it matches the API server OpenAPI spec.)

The API server returns, for example, the following component keys, as verified by curl -v -H "X-API-Key: $DT_API_KEY" -H "Accept: application/json" localhost:8080/api/v1/component/project/ca1a176a-97ec-4c51-af27-c6c156bd5b82 | jq ".[0] | keys":
classifier, expandDependencyGraph, isInternal, lastInheritedRiskScore, metrics, name, project, purl, purlCoordinates, repositoryMeta, usedBy, uuid, version

The OpenAPI spec and dtrack.Component references many fields I have not seen returned by /api/v1/component/project/{uuid}, such as SHAs.

I mention this because I'd really like access to repositoryMeta.published, which is returned, but not in a documented way.

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

No branches or pull requests

1 participant