Skip to content

Commit 08dab12

Browse files
trustify-ci-bot[bot]github-merge-queue[bot]carlosthe19916
authored
🌱 [main] update client/openapi/trustd.yaml (guacsec#929)
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 34337dc commit 08dab12

File tree

7 files changed

+175
-42
lines changed

7 files changed

+175
-42
lines changed

client/openapi/trustd.yaml

Lines changed: 163 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,11 @@ paths:
857857
description: return the parent chain
858858
required: false
859859
schema:
860-
type: boolean
860+
type: string
861+
enum:
862+
- skip
863+
- id
864+
- resolve
861865
- name: offset
862866
in: query
863867
description: |-
@@ -960,7 +964,7 @@ paths:
960964
content:
961965
application/json:
962966
schema:
963-
$ref: '#/components/schemas/PaginatedResults_GroupDetails'
967+
$ref: '#/components/schemas/GroupListResult'
964968
'400':
965969
description: The request was not valid
966970
'401':
@@ -998,6 +1002,90 @@ paths:
9981002
description: The user authenticated, but not authorized for this operation
9991003
'409':
10001004
description: The name of the group is not unique within the parent
1005+
/api/v2/group/sbom-assignment:
1006+
put:
1007+
tags:
1008+
- sbomGroup
1009+
summary: Bulk update SBOM group assignments
1010+
operationId: bulkUpdateSbomGroupAssignments
1011+
requestBody:
1012+
content:
1013+
application/json:
1014+
schema:
1015+
$ref: '#/components/schemas/BulkAssignmentRequest'
1016+
required: true
1017+
responses:
1018+
'204':
1019+
description: The SBOM assignments were updated
1020+
'400':
1021+
description: The request was not valid
1022+
'401':
1023+
description: The user was not authenticated
1024+
'403':
1025+
description: The user authenticated, but not authorized for this operation
1026+
/api/v2/group/sbom-assignment/{id}:
1027+
get:
1028+
tags:
1029+
- sbomGroup
1030+
summary: Get SBOM group assignments
1031+
operationId: readSbomGroupAssignments
1032+
parameters:
1033+
- name: id
1034+
in: path
1035+
description: The ID of the SBOM
1036+
required: true
1037+
schema:
1038+
type: string
1039+
responses:
1040+
'200':
1041+
description: The SBOM was found and assignments returned
1042+
'400':
1043+
description: The request was not valid
1044+
'401':
1045+
description: The user was not authenticated
1046+
'403':
1047+
description: The user authenticated, but not authorized for this operation
1048+
'404':
1049+
description: The SBOM was not found
1050+
put:
1051+
tags:
1052+
- sbomGroup
1053+
summary: Update SBOM group assignments
1054+
operationId: updateSbomGroupAssignments
1055+
parameters:
1056+
- name: id
1057+
in: path
1058+
description: The ID of the SBOM to update
1059+
required: true
1060+
schema:
1061+
type: string
1062+
- name: if-match
1063+
in: header
1064+
description: The revision of the SBOM assignments
1065+
required: false
1066+
schema:
1067+
type:
1068+
- string
1069+
- 'null'
1070+
requestBody:
1071+
content:
1072+
application/json:
1073+
schema:
1074+
type: array
1075+
items:
1076+
type: string
1077+
required: true
1078+
responses:
1079+
'204':
1080+
description: The SBOM assignments were updated
1081+
'400':
1082+
description: The request was not valid
1083+
'401':
1084+
description: The user was not authenticated
1085+
'403':
1086+
description: The user authenticated, but not authorized for this operation
1087+
'412':
1088+
description: The requested revision is not the current revision
10011089
/api/v2/group/sbom/{id}:
10021090
get:
10031091
tags:
@@ -1103,6 +1191,8 @@ paths:
11031191
description: The user was not authenticated
11041192
'403':
11051193
description: The user authenticated, but not authorized for this operation
1194+
'409':
1195+
description: The group has child groups and cannot be deleted
11061196
'412':
11071197
description: The requested revision is not the current revision of the group
11081198
/api/v2/importer:
@@ -2326,6 +2416,16 @@ paths:
23262416
type: integer
23272417
format: int64
23282418
minimum: 0
2419+
- name: group
2420+
in: path
2421+
description: |-
2422+
Filter by group IDs. Only SBOMs assigned to any of the provided groups will be returned.
2423+
Can be specified multiple times. Malformed IDs are silently ignored.
2424+
required: true
2425+
schema:
2426+
type: array
2427+
items:
2428+
type: string
23292429
responses:
23302430
'200':
23312431
description: Matching SBOMs
@@ -2340,7 +2440,7 @@ paths:
23402440
operationId: uploadSbom
23412441
parameters:
23422442
- name: labels
2343-
in: query
2443+
in: path
23442444
description: |-
23452445
Optional labels.
23462446
@@ -2349,9 +2449,9 @@ paths:
23492449
schema:
23502450
$ref: '#/components/schemas/Labels'
23512451
- name: format
2352-
in: query
2452+
in: path
23532453
description: The format of the uploaded document.
2354-
required: false
2454+
required: true
23552455
schema:
23562456
type: string
23572457
enum:
@@ -2367,15 +2467,27 @@ paths:
23672467
- sbom
23682468
- unknown
23692469
- name: cache
2370-
in: query
2470+
in: path
23712471
description: Await loading the document into the analysis graph cache
2372-
required: false
2472+
required: true
23732473
schema:
23742474
type: string
23752475
enum:
23762476
- skip
23772477
- queue
23782478
- wait
2479+
- name: group
2480+
in: path
2481+
description: |-
2482+
Optional group IDs to assign the SBOM to after ingestion.
2483+
2484+
If one or more group IDs are invalid, the upload will fail with 400 Bad Request
2485+
and the SBOM will not be ingested.
2486+
required: true
2487+
schema:
2488+
type: array
2489+
items:
2490+
type: string
23792491
requestBody:
23802492
content:
23812493
application/octet-stream:
@@ -2394,7 +2506,7 @@ paths:
23942506
schema:
23952507
$ref: '#/components/schemas/IngestResult'
23962508
'400':
2397-
description: The file could not be parsed as an SBOM
2509+
description: One or more group IDs are invalid or do not exist
23982510
/api/v2/sbom-labels:
23992511
get:
24002512
tags:
@@ -3798,6 +3910,23 @@ components:
37983910
type: string
37993911
BinaryByteSize:
38003912
type: string
3913+
BulkAssignmentRequest:
3914+
type: object
3915+
description: Request to assign multiple SBOMs to the same set of groups.
3916+
required:
3917+
- sbom_ids
3918+
- group_ids
3919+
properties:
3920+
group_ids:
3921+
type: array
3922+
items:
3923+
type: string
3924+
description: The group IDs to assign to each SBOM (replaces existing assignments).
3925+
sbom_ids:
3926+
type: array
3927+
items:
3928+
type: string
3929+
description: The IDs of the SBOMs to update.
38013930
ByteSizeDef:
38023931
type: string
38033932
CacheStatusDetails:
@@ -4057,6 +4186,11 @@ components:
40574186
- id
40584187
- name
40594188
properties:
4189+
description:
4190+
type:
4191+
- string
4192+
- 'null'
4193+
description: A user friendly description
40604194
id:
40614195
type: string
40624196
description: The ID of the group
@@ -4070,57 +4204,44 @@ components:
40704204
type:
40714205
- string
40724206
- 'null'
4073-
description: The parent of this group
4074-
GroupDetails:
4207+
description: The direct parent of this group
4208+
GroupListResult:
40754209
allOf:
4076-
- $ref: '#/components/schemas/Group'
4210+
- $ref: '#/components/schemas/PaginatedResults_GroupDetails'
40774211
- type: object
40784212
properties:
4079-
number_of_groups:
4080-
type:
4081-
- integer
4082-
- 'null'
4083-
format: int64
4084-
description: |-
4085-
The number of groups owned directly by this group
4086-
4087-
This information is only present when requested.
4088-
minimum: 0
4089-
number_of_sboms:
4090-
type:
4091-
- integer
4092-
- 'null'
4093-
format: int64
4094-
description: |-
4095-
The number of SBOMs directly assigned to this group
4096-
4097-
This information is only present when requested.
4098-
minimum: 0
4099-
parents:
4213+
referenced:
41004214
type:
41014215
- array
41024216
- 'null'
41034217
items:
4104-
type: string
4218+
$ref: '#/components/schemas/Group'
41054219
description: |-
4106-
The path, of IDs, from the root to this group
4220+
Groups referenced by parent chains but not present in the primary result set.
41074221
4108-
This information is only present when requested.
4109-
description: Detailed group information, extends [`Group`]
4222+
Only present when `parents=resolve` is requested.
4223+
description: Result of listing SBOM groups, with optional resolved parent references.
41104224
GroupRequest:
41114225
type: object
41124226
description: Mutable properties of a [`Group`].
41134227
required:
41144228
- name
41154229
properties:
4230+
description:
4231+
type:
4232+
- string
4233+
- 'null'
4234+
description: A user provided description
41164235
labels:
41174236
$ref: '#/components/schemas/Labels'
41184237
name:
41194238
type: string
4239+
description: The name of the group.
41204240
parent:
41214241
type:
41224242
- string
41234243
- 'null'
4244+
description: The ID of the group's parent.
41244245
Id:
41254246
type: string
41264247
description: |-
@@ -5322,6 +5443,11 @@ components:
53225443
- id
53235444
- name
53245445
properties:
5446+
description:
5447+
type:
5448+
- string
5449+
- 'null'
5450+
description: A user friendly description
53255451
id:
53265452
type: string
53275453
description: The ID of the group
@@ -5335,7 +5461,7 @@ components:
53355461
type:
53365462
- string
53375463
- 'null'
5338-
description: The parent of this group
5464+
description: The direct parent of this group
53395465
Revisioned_Importer:
53405466
type: object
53415467
description: |-

client/src/app/components/WithSBOMsByLicense.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type React from "react";
22

3-
import type { AxiosError } from "axios";
43
import { useFetchSBOMs } from "@app/queries/sboms";
4+
import type { AxiosError } from "axios";
55

66
export interface WithSBOMsByLicenseProps {
77
licenseId: string;
@@ -17,6 +17,7 @@ export const WithSBOMsByLicense: React.FC<WithSBOMsByLicenseProps> = ({
1717
children,
1818
}) => {
1919
const { result, isFetching, fetchError } = useFetchSBOMs(
20+
undefined,
2021
{
2122
filters: [{ field: "license", operator: "=", value: licenseId }],
2223
page: { itemsPerPage: 1, pageNumber: 1 },

client/src/app/pages/home/components/MonitoringSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const MonitoringSection: React.FC = () => {
6161
result: { data: barchartSboms, total: totalSboms },
6262
isFetching: isFetchingBarchartSboms,
6363
fetchError: fetchErrorBarchartSboms,
64-
} = useFetchSBOMs({
64+
} = useFetchSBOMs(undefined, {
6565
page: { pageNumber: 1, itemsPerPage: 10 },
6666
sort: { field: "ingested", direction: "desc" },
6767
});

client/src/app/pages/home/components/WatchedSbom.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export const WatchedSbom: React.FC<WatchedSbomProps> = ({
8181

8282
const {
8383
result: { data: sbomOptions },
84-
} = useFetchSBOMs({
84+
} = useFetchSBOMs(undefined, {
8585
filters: [{ field: "", operator: "~", value: debouncedInputValue }],
8686
page: { pageNumber: 1, itemsPerPage: 10 },
8787
sort: { field: "ingested", direction: "desc" },

client/src/app/pages/sbom-list/sbom-context.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ export const SbomSearchProvider: React.FunctionComponent<ISbomProvider> = ({
161161
isFetching,
162162
fetchError,
163163
} = useFetchSBOMs(
164+
undefined,
164165
getHubRequestParams({
165166
...tableControlState,
166167
hubSortFieldKeys: {

client/src/app/pages/search/components/SearchMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function useAllEntities(filterText: string, disableSearch: boolean) {
7676
const {
7777
isFetching: isFetchingSBOMs,
7878
result: { data: sboms },
79-
} = useFetchSBOMs({ ...params }, [], disableSearch);
79+
} = useFetchSBOMs(undefined, { ...params }, [], disableSearch);
8080

8181
const {
8282
isFetching: isFetchingVulnerabilities,

0 commit comments

Comments
 (0)