Skip to content

OpenAPI schema missing for /api/v1/finding/project/{uuid} response #2590

Description

@empwilli

Current Behavior

The returned Component model varies for different REST API endpoints. The /v1/findings/project/<uuid> endpoint returns:

[
    {
        "component": {
            "project": <uuid>, ...
        },
        ...
    },
    ...
]

Whereas the components returned by the /v1/component/project/{uuid} endpoint contain full project descriptions:

[
  {
    ...
    "project": {
      "name": ...,
      "version": ...,
      "classifier": ...,
      "uuid": "<uuid>",
      ...
    },

Steps to Reproduce

Query on the /finding/project Endpoint:

curl -X 'GET' \
  'https://dependencytrack.tld/api/v1/finding/project/<uuid>' \
  -H 'accept: application/json' 

Query on the /component/project Endpoint:

curl -X 'GET' \
  'https://dependencytrack.tld/api/v1/component/project/<uuid>' \
  -H 'accept: application/json'

Expected Behavior

The finding endpoint should return a populated project object.

Dependency-Track Version

4.7.1

Dependency-Track Distribution

Container Image

Database Server

PostgreSQL

Database Server Version

No response

Browser

N/A

Checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    api docsapi-inconsistencydefectSomething isn't workinggood first issueGood for newcomersp2Non-critical bugs, and features that help organizations to identify and reduce risksize/SSmall effort

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions