Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update client/openapi/trustd.yaml #260

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 31 additions & 31 deletions client/openapi/trustd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ info:
license:
name: Apache License, Version 2.0
identifier: Apache-2.0
version: 0.1.0-alpha.23
version: 0.1.0-alpha.24
paths:
/.well-known/trustify:
get:
Expand Down Expand Up @@ -2243,6 +2243,7 @@ components:
required:
- sbom_id
- node_id
- relationship
- purl
- name
- version
Expand All @@ -2253,6 +2254,8 @@ components:
type: string
purl:
type: string
relationship:
type: string
sbom_id:
type: string
version:
Expand Down Expand Up @@ -3034,17 +3037,11 @@ components:
- type: object
required:
- described_by
- number_of_packages
properties:
described_by:
type: array
items:
$ref: '#/components/schemas/SbomPackage'
number_of_packages:
type: integer
format: int64
description: The number of packages this SBOM has
minimum: 0
total:
type: integer
format: int64
Expand Down Expand Up @@ -3344,6 +3341,7 @@ components:
- dev_tool_of
- described_by
- package_of
- undefined
Report:
type: object
required:
Expand Down Expand Up @@ -3427,6 +3425,7 @@ components:
- published
- authors
- name
- number_of_packages
properties:
authors:
type: array
Expand All @@ -3444,6 +3443,11 @@ components:
$ref: '#/components/schemas/Labels'
name:
type: string
number_of_packages:
type: integer
format: int64
description: The number of packages this SBOM has
minimum: 0
published:
type:
- string
Expand Down Expand Up @@ -3515,24 +3519,26 @@ components:
relationship:
$ref: '#/components/schemas/Relationship'
SbomStatus:
type: object
required:
- vulnerability_id
- status
- packages
properties:
context:
oneOf:
- type: 'null'
- $ref: '#/components/schemas/StatusContext'
packages:
type: array
items:
$ref: '#/components/schemas/SbomPackage'
status:
type: string
vulnerability_id:
type: string
allOf:
- $ref: '#/components/schemas/VulnerabilityHead'
- type: object
required:
- average_severity
- status
- packages
properties:
average_severity:
$ref: '#/components/schemas/Severity'
context:
oneOf:
- type: 'null'
- $ref: '#/components/schemas/StatusContext'
packages:
type: array
items:
$ref: '#/components/schemas/SbomPackage'
status:
type: string
SbomSummary:
allOf:
- $ref: '#/components/schemas/SbomHead'
Expand All @@ -3542,17 +3548,11 @@ components:
- type: object
required:
- described_by
- number_of_packages
properties:
described_by:
type: array
items:
$ref: '#/components/schemas/SbomPackage'
number_of_packages:
type: integer
format: int64
description: The number of packages this SBOM has
minimum: 0
Severity:
type: string
description: |-
Expand Down
80 changes: 43 additions & 37 deletions client/src/app/client/schemas.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export const AnalysisStatusSchema = {

export const AncNodeSchema = {
type: "object",
required: ["sbom_id", "node_id", "purl", "name", "version"],
required: ["sbom_id", "node_id", "relationship", "purl", "name", "version"],
properties: {
name: {
type: "string",
Expand All @@ -287,6 +287,9 @@ export const AncNodeSchema = {
purl: {
type: "string",
},
relationship: {
type: "string",
},
sbom_id: {
type: "string",
},
Expand Down Expand Up @@ -1382,20 +1385,14 @@ export const PaginatedResults_SbomSummarySchema = {
},
{
type: "object",
required: ["described_by", "number_of_packages"],
required: ["described_by"],
properties: {
described_by: {
type: "array",
items: {
$ref: "#/components/schemas/SbomPackage",
},
},
number_of_packages: {
type: "integer",
format: "int64",
description: "The number of packages this SBOM has",
minimum: 0,
},
},
},
],
Expand Down Expand Up @@ -1843,6 +1840,7 @@ export const RelationshipSchema = {
"dev_tool_of",
"described_by",
"package_of",
"undefined",
],
} as const;

Expand Down Expand Up @@ -1952,6 +1950,7 @@ export const SbomHeadSchema = {
"published",
"authors",
"name",
"number_of_packages",
],
properties: {
authors: {
Expand All @@ -1978,6 +1977,12 @@ export const SbomHeadSchema = {
name: {
type: "string",
},
number_of_packages: {
type: "integer",
format: "int64",
description: "The number of packages this SBOM has",
minimum: 0,
},
published: {
type: ["string", "null"],
format: "date-time",
Expand Down Expand Up @@ -2077,32 +2082,39 @@ export const SbomPackageRelationSchema = {
} as const;

export const SbomStatusSchema = {
type: "object",
required: ["vulnerability_id", "status", "packages"],
properties: {
context: {
oneOf: [
{
type: "null",
allOf: [
{
$ref: "#/components/schemas/VulnerabilityHead",
},
{
type: "object",
required: ["average_severity", "status", "packages"],
properties: {
average_severity: {
$ref: "#/components/schemas/Severity",
},
{
$ref: "#/components/schemas/StatusContext",
context: {
oneOf: [
{
type: "null",
},
{
$ref: "#/components/schemas/StatusContext",
},
],
},
packages: {
type: "array",
items: {
$ref: "#/components/schemas/SbomPackage",
},
},
status: {
type: "string",
},
],
},
packages: {
type: "array",
items: {
$ref: "#/components/schemas/SbomPackage",
},
},
status: {
type: "string",
},
vulnerability_id: {
type: "string",
},
},
],
} as const;

export const SbomSummarySchema = {
Expand All @@ -2122,20 +2134,14 @@ export const SbomSummarySchema = {
},
{
type: "object",
required: ["described_by", "number_of_packages"],
required: ["described_by"],
properties: {
described_by: {
type: "array",
items: {
$ref: "#/components/schemas/SbomPackage",
},
},
number_of_packages: {
type: "integer",
format: "int64",
description: "The number of packages this SBOM has",
minimum: 0,
},
},
},
],
Expand Down
20 changes: 9 additions & 11 deletions client/src/app/client/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export type AncNode = {
name: string;
node_id: string;
purl: string;
relationship: string;
sbom_id: string;
version: string;
};
Expand Down Expand Up @@ -537,10 +538,6 @@ export type PaginatedResults_SbomSummary = {
SbomHead &
(null | SourceDocument) & {
described_by: Array<SbomPackage>;
/**
* The number of packages this SBOM has
*/
number_of_packages: number;
}
>;
total: number;
Expand Down Expand Up @@ -687,7 +684,8 @@ export type Relationship =
| "build_tool_of"
| "dev_tool_of"
| "described_by"
| "package_of";
| "package_of"
| "undefined";

export type Report = {
/**
Expand Down Expand Up @@ -741,6 +739,10 @@ export type SbomHead = {
id: string;
labels: Labels;
name: string;
/**
* The number of packages this SBOM has
*/
number_of_packages: number;
published: string | null;
};

Expand All @@ -767,20 +769,16 @@ export type SbomPackageRelation = {
relationship: Relationship;
};

export type SbomStatus = {
export type SbomStatus = VulnerabilityHead & {
average_severity: Severity;
context?: null | StatusContext;
packages: Array<SbomPackage>;
status: string;
vulnerability_id: string;
};

export type SbomSummary = SbomHead &
(null | SourceDocument) & {
described_by: Array<SbomPackage>;
/**
* The number of packages this SBOM has
*/
number_of_packages: number;
};

/**
Expand Down
Loading