Skip to content

Commit e5fa353

Browse files
Update OpenAPI docs (#20)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: dependencytrack-bot <106437498+dependencytrack-bot@users.noreply.github.com>
1 parent 18dbee4 commit e5fa353

2 files changed

Lines changed: 26 additions & 2 deletions

File tree

docs/reference/api/openapi-v1.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,18 @@ info:
33
contact:
44
name: The Dependency-Track Authors
55
url: https://github.com/DependencyTrack/dependency-track
6-
description: REST API of OWASP Dependency-Track
6+
description: |-
7+
REST API of OWASP Dependency-Track
8+
9+
## Deprecations
10+
11+
Operations may be removed or replaced over time. When a response
12+
carries the `X-API-Deprecated: true` header, the operation that
13+
produced it is deprecated and may be removed in a future release.
14+
Clients should check for this header on every response and surface
15+
it (e.g. via a log warning) so that operators are aware of
16+
upcoming breakages. The respective operation's description points
17+
out which alternative operation(s) to use.
718
license:
819
name: Apache-2.0
920
url: https://www.apache.org/licenses/LICENSE-2.0.html
@@ -8684,7 +8695,10 @@ paths:
86848695
- vulnerability
86858696
/v1/vulnerability/project/{uuid}:
86868697
get:
8687-
description: <p>Requires permission <strong>VIEW_PORTFOLIO</strong></p>
8698+
deprecated: true
8699+
description: |-
8700+
<p>Requires permission <strong>VIEW_PORTFOLIO</strong></p>
8701+
<p><strong>Deprecated</strong>! Use <code>/api/v1/finding/project/{uuid}</code> instead.</p>
86888702
operationId: getVulnerabilitiesByProject
86898703
parameters:
86908704
- description: The UUID of the project to retrieve vulnerabilities for

docs/reference/api/openapi-v2.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,16 @@ info:
8585
created resource.
8686
8787
Delete operations return `204 No Content` with no body.
88+
89+
## Deprecations
90+
91+
Operations may be removed or replaced over time. When a response
92+
carries the `X-API-Deprecated: true` header, the operation that
93+
produced it is deprecated and may be removed in a future release.
94+
Clients should check for this header on every response and surface
95+
it (e.g. via a log warning) so that operators are aware of upcoming
96+
breakages. The respective operation's description points out which
97+
alternative operation(s) to use.
8898
contact:
8999
name: The Dependency-Track Authors
90100
url: https://github.com/DependencyTrack/dependency-track

0 commit comments

Comments
 (0)