-
-
Notifications
You must be signed in to change notification settings - Fork 580
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
OpenAPI GET /v1/component/project/{uuid} return value incorrect #3608
Comments
Also note that this API seems to respect |
That not all fields are returned for every API endpoint is kind of intended. Ideally, listing many components would only yield surface-level fields such as identifiers. For more details, each component would need to be requested explicitly (or in bulk by providing multiple UUIDs for example). I do agree that the API spec needs to make such behavior clear though. The fact that it doesn't is a symptom of reusing the same model classes across all endpoints.
Also agree. The reason those are currently not part of the OpenAPI spec, is that they are implicit, and not every endpoint has explicit definitions for them. The good news is that this is easily solvable for us using the There are multiple improvements towards the OpenAPI spec coming in v4.11, I might be able to squeeze that in as well. It's literally just copy-pasting annotations hopefully. |
Sorry, misread what you meant with:
I think the parameters you're looking for are This kind of alludes to what I mentioned in my answer above: The pagination parameters are missing from the OpenAPI spec. |
Relates to DependencyTrack#3608 Signed-off-by: nscuro <[email protected]>
Relates to DependencyTrack#3608 Signed-off-by: nscuro <[email protected]>
Documentation for pagination parameters is coming with #3625. |
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 DependencyTrack/client-go#26 and #2604
Steps to Reproduce
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
The text was updated successfully, but these errors were encountered: