Skip to content

Commit

Permalink
update client/openapi/trustd.yaml (#282)
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <[email protected]>
Co-authored-by: github-merge-queue[bot] <github-merge-queue[bot]@users.noreply.github.com>
  • Loading branch information
carlosthe19916 and github-merge-queue[bot] authored Dec 4, 2024
1 parent 6d17277 commit 08665bb
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 5 deletions.
4 changes: 4 additions & 0 deletions client/openapi/trustd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2078,12 +2078,16 @@ components:
required:
- uuid
- identifier
- document_id
- issuer
- published
- withdrawn
- title
- labels
properties:
document_id:
type: string
description: The identifier of the advisory, as provided by the document.
identifier:
type: string
description: The identifier of the advisory, as assigned by the issuing organization.
Expand Down
6 changes: 6 additions & 0 deletions client/src/app/client/schemas.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,19 @@ export const AdvisoryHeadSchema = {
required: [
"uuid",
"identifier",
"document_id",
"issuer",
"published",
"withdrawn",
"title",
"labels",
],
properties: {
document_id: {
type: "string",
description:
"The identifier of the advisory, as provided by the document.",
},
identifier: {
type: "string",
description:
Expand Down
4 changes: 4 additions & 0 deletions client/src/app/client/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export type AdvisoryDetails = AdvisoryHead &
};

export type AdvisoryHead = {
/**
* The identifier of the advisory, as provided by the document.
*/
document_id: string;
/**
* The identifier of the advisory, as assigned by the issuing organization.
*/
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/pages/advisory-details/advisory-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const AdvisoryDetails: React.FC = () => {
<SplitItem isFilled>
<TextContent>
<Text component="h1">
{advisory?.identifier ?? advisoryId ?? ""}
{advisory?.document_id ?? advisoryId ?? ""}
</Text>
<Text component="p">Advisory detail information</Text>
</TextContent>
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/pages/advisory-list/advisory-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const AdvisoryTable: React.FC = ({}) => {
})}
>
<NavLink to={`/advisories/${item.uuid}`}>
{item.identifier}
{item.document_id}
</NavLink>
</Td>
<Td
Expand Down
4 changes: 2 additions & 2 deletions client/src/app/pages/search/components/SearchMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ function useAllEntities(filterText: string) {
const tmpArray: IEntity[] = [];

const transformedAdvisories: IEntity[] = advisories.map((item) => ({
id: item.identifier,
title: item.identifier,
id: item.document_id,
title: item.document_id,
description: item.title?.substring(0, 75),
navLink: `/advisories/${item.uuid}`,
type: "Advisory",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const PrimaryState: Story = {
{
uuid: "urn:uuid:753e8448-2086-4908-a027-1f1a7b95fa6a",
identifier: "CVE-2024-8391",
document_id: "CVE-2024-8391",
issuer: {
id: "9cf89bf3-ef8d-44ba-87a8-66a324795996",
name: "eclipse",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const AdvisoriesByVulnerability: React.FC<
<Tr key={item.identifier} {...getTrProps({ item })}>
<Td width={15} {...getTdProps({ columnKey: "identifier" })}>
<Link to={`/advisories/${item.uuid}`}>
{item.identifier}
{item.document_id}
</Link>
</Td>
<Td
Expand Down

0 comments on commit 08665bb

Please sign in to comment.