Skip to content

Commit d218489

Browse files
trustify-ci-bot[bot]github-merge-queue[bot]carlosthe19916
authored
🌱 [main] update client/openapi/trustd.yaml (#903)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Carlos Feria <2582866+carlosthe19916@users.noreply.github.com> Co-authored-by: github-merge-queue[bot] <118344674+github-merge-queue[bot]@users.noreply.github.com> Co-authored-by: Carlos Feria <2582866+carlosthe19916@users.noreply.github.com>
1 parent 7a128d7 commit d218489

File tree

2 files changed

+25
-20
lines changed

2 files changed

+25
-20
lines changed

client/openapi/trustd.yaml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2992,7 +2992,7 @@ paths:
29922992
content:
29932993
application/json:
29942994
schema:
2995-
$ref: '#/components/schemas/AnalysisResponseV2'
2995+
$ref: '#/components/schemas/AnalysisResponse'
29962996
/api/v2/vulnerability/{id}:
29972997
get:
29982998
tags:
@@ -3163,7 +3163,7 @@ paths:
31633163
content:
31643164
application/json:
31653165
schema:
3166-
$ref: '#/components/schemas/AnalysisResponse'
3166+
$ref: '#/components/schemas/AnalysisResponseV3'
31673167
components:
31683168
schemas:
31693169
AdvisoryDetails:
@@ -3331,18 +3331,6 @@ components:
33313331
$ref: '#/components/schemas/Score'
33323332
description: CVSS scores
33333333
AnalysisDetails:
3334-
allOf:
3335-
- $ref: '#/components/schemas/VulnerabilityHead'
3336-
- type: object
3337-
required:
3338-
- purl_statuses
3339-
properties:
3340-
purl_statuses:
3341-
type: array
3342-
items:
3343-
$ref: '#/components/schemas/PurlStatus'
3344-
description: List of purl statuses
3345-
AnalysisDetailsV2:
33463334
allOf:
33473335
- $ref: '#/components/schemas/VulnerabilityHead'
33483336
- type: object
@@ -3358,6 +3346,16 @@ components:
33583346
$ref: '#/components/schemas/AnalysisAdvisory'
33593347
propertyNames:
33603348
type: string
3349+
AnalysisDetailsV3:
3350+
type: object
3351+
required:
3352+
- purl_statuses
3353+
properties:
3354+
purl_statuses:
3355+
type: array
3356+
items:
3357+
$ref: '#/components/schemas/PurlStatus'
3358+
description: List of purl statuses
33613359
AnalysisRequest:
33623360
type: object
33633361
required:
@@ -3373,10 +3371,10 @@ components:
33733371
$ref: '#/components/schemas/AnalysisResult'
33743372
propertyNames:
33753373
type: string
3376-
AnalysisResponseV2:
3374+
AnalysisResponseV3:
33773375
type: object
33783376
additionalProperties:
3379-
$ref: '#/components/schemas/AnalysisResultV2'
3377+
$ref: '#/components/schemas/AnalysisResultV3'
33803378
propertyNames:
33813379
type: string
33823380
AnalysisResult:
@@ -3393,7 +3391,7 @@ components:
33933391
type: array
33943392
items:
33953393
type: string
3396-
AnalysisResultV2:
3394+
AnalysisResultV3:
33973395
type: object
33983396
required:
33993397
- details
@@ -3402,7 +3400,7 @@ components:
34023400
details:
34033401
type: array
34043402
items:
3405-
$ref: '#/components/schemas/AnalysisDetailsV2'
3403+
$ref: '#/components/schemas/AnalysisDetailsV3'
34063404
warnings:
34073405
type: array
34083406
items:
@@ -4694,6 +4692,7 @@ components:
46944692
required:
46954693
- vulnerability
46964694
- advisory
4695+
- scores
46974696
- average_severity
46984697
- average_score
46994698
- status
@@ -4704,12 +4703,18 @@ components:
47044703
average_score:
47054704
type: number
47064705
format: double
4706+
deprecated: true
47074707
average_severity:
47084708
$ref: '#/components/schemas/Severity'
47094709
context:
47104710
oneOf:
47114711
- type: 'null'
47124712
- $ref: '#/components/schemas/StatusContext'
4713+
scores:
4714+
type: array
4715+
items:
4716+
$ref: '#/components/schemas/Score'
4717+
description: All CVSS scores associated with the vulnerability
47134718
status:
47144719
type: string
47154720
version_range:

client/src/app/queries/vulnerabilities.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { AxiosError } from "axios";
44
import type { HubRequestParams } from "@app/api/models";
55
import { client } from "@app/axios-config/apiInit";
66
import {
7-
type AnalysisResponseV2,
7+
type AnalysisResponse,
88
analyze,
99
getVulnerability,
1010
listVulnerabilities,
@@ -71,7 +71,7 @@ export const useFetchVulnerabilitiesByPackageIds = (ids: string[]) => {
7171
const isFetching = userQueries.some(({ isFetching }) => isFetching);
7272
const fetchError = userQueries.find(({ error }) => !!error);
7373

74-
const analysisResponse: AnalysisResponseV2 = {};
74+
const analysisResponse: AnalysisResponse = {};
7575

7676
if (!isFetching) {
7777
for (const data of userQueries.map((item) => item?.data ?? {})) {

0 commit comments

Comments
 (0)