From 9a6bc589cb0c6d861892b1d93ced92545e8ff4a1 Mon Sep 17 00:00:00 2001 From: Bence Csati Date: Tue, 23 Jul 2024 11:32:49 +0200 Subject: [PATCH] fix: ci and makefile Signed-off-by: Bence Csati --- Makefile | 2 +- ui/src/api/generated/.openapi-generator/FILES | 1 - ui/src/api/generated/api.ts | 105 +++++++++++++----- 3 files changed, 78 insertions(+), 30 deletions(-) diff --git a/Makefile b/Makefile index 3e2963a4f7..adb88ce8ad 100644 --- a/Makefile +++ b/Makefile @@ -347,7 +347,7 @@ gen: gen-api-js gen-api-go gen-bicep gen-helm-docs ## Generating all code, manif .PHONY: gen-api-js gen-api-js: ## Generating Javascript library for API specification $(info Generating API for UI code ...) - npx @openapitools/openapi-generator-cli generate -i ./api/openapi.yaml -g typescript-axios -o ./ui/src/api/generated --openapi-normalizer SET_TAGS_FOR_ALL_OPERATIONS=VMClarity + @(cd ui && npx @openapitools/openapi-generator-cli generate -i ../api/openapi.yaml -g typescript-axios -o ./src/api/generated --openapi-normalizer SET_TAGS_FOR_ALL_OPERATIONS=VMClarity) .PHONY: gen-api-go gen-api-go: gen-apiserver-api gen-uibackend-api gen-plugin-sdk ## Generating Go API code diff --git a/ui/src/api/generated/.openapi-generator/FILES b/ui/src/api/generated/.openapi-generator/FILES index 16b445eee6..a80cd4f07b 100644 --- a/ui/src/api/generated/.openapi-generator/FILES +++ b/ui/src/api/generated/.openapi-generator/FILES @@ -1,6 +1,5 @@ .gitignore .npmignore -.openapi-generator-ignore api.ts base.ts common.ts diff --git a/ui/src/api/generated/api.ts b/ui/src/api/generated/api.ts index a5edb37ca5..19f2aca471 100644 --- a/ui/src/api/generated/api.ts +++ b/ui/src/api/generated/api.ts @@ -1552,6 +1552,12 @@ export interface Finding { * @memberof Finding */ 'findingInfo'?: FindingInfo; + /** + * + * @type {FindingSummary} + * @memberof Finding + */ + 'summary'?: FindingSummary; } /** * @@ -1869,6 +1875,31 @@ export interface FindingRelationship { * @memberof FindingRelationship */ 'findingInfo'?: FindingInfo; + /** + * + * @type {FindingSummary} + * @memberof FindingRelationship + */ + 'summary'?: FindingSummary; +} +/** + * + * @export + * @interface FindingSummary + */ +export interface FindingSummary { + /** + * + * @type {string} + * @memberof FindingSummary + */ + 'updatedAt'?: string; + /** + * + * @type {VulnerabilitySeveritySummary} + * @memberof FindingSummary + */ + 'totalVulnerabilities'?: VulnerabilitySeveritySummary; } /** * @@ -2500,6 +2531,24 @@ export interface PluginsConfig { * @memberof PluginsConfig */ 'enabled'?: boolean; + /** + * + * @type {boolean} + * @memberof PluginsConfig + */ + 'binary_mode'?: boolean; + /** + * + * @type {string} + * @memberof PluginsConfig + */ + 'binary_artifacts_path'?: string; + /** + * + * @type {boolean} + * @memberof PluginsConfig + */ + 'binary_artifacts_clean'?: boolean; /** * * @type {Array} @@ -3532,10 +3581,10 @@ export interface ScanFindingsSummary { 'totalInfoFinder'?: number; /** * - * @type {VulnerabilityScanSummary} + * @type {VulnerabilitySeveritySummary} * @memberof ScanFindingsSummary */ - 'totalVulnerabilities'?: VulnerabilityScanSummary; + 'totalVulnerabilities'?: VulnerabilitySeveritySummary; /** * * @type {number} @@ -3739,10 +3788,10 @@ export interface ScanSummary { 'totalInfoFinder'?: number; /** * - * @type {VulnerabilityScanSummary} + * @type {VulnerabilitySeveritySummary} * @memberof ScanSummary */ - 'totalVulnerabilities'?: VulnerabilityScanSummary; + 'totalVulnerabilities'?: VulnerabilitySeveritySummary; /** * * @type {number} @@ -4557,60 +4606,60 @@ export interface VulnerabilityScan { */ 'vulnerabilities'?: Array | null; } +/** + * + * @export + * @enum {string} + */ + +export const VulnerabilitySeverity = { + Critical: 'CRITICAL', + High: 'HIGH', + Medium: 'MEDIUM', + Low: 'LOW', + Negligible: 'NEGLIGIBLE' +} as const; + +export type VulnerabilitySeverity = typeof VulnerabilitySeverity[keyof typeof VulnerabilitySeverity]; + + /** * A summary of number of vulnerabilities found per severity. * @export - * @interface VulnerabilityScanSummary + * @interface VulnerabilitySeveritySummary */ -export interface VulnerabilityScanSummary { +export interface VulnerabilitySeveritySummary { /** * * @type {number} - * @memberof VulnerabilityScanSummary + * @memberof VulnerabilitySeveritySummary */ 'totalCriticalVulnerabilities'?: number; /** * * @type {number} - * @memberof VulnerabilityScanSummary + * @memberof VulnerabilitySeveritySummary */ 'totalHighVulnerabilities'?: number; /** * * @type {number} - * @memberof VulnerabilityScanSummary + * @memberof VulnerabilitySeveritySummary */ 'totalMediumVulnerabilities'?: number; /** * * @type {number} - * @memberof VulnerabilityScanSummary + * @memberof VulnerabilitySeveritySummary */ 'totalLowVulnerabilities'?: number; /** * * @type {number} - * @memberof VulnerabilityScanSummary + * @memberof VulnerabilitySeveritySummary */ 'totalNegligibleVulnerabilities'?: number; } -/** - * - * @export - * @enum {string} - */ - -export const VulnerabilitySeverity = { - Critical: 'CRITICAL', - High: 'HIGH', - Medium: 'MEDIUM', - Low: 'LOW', - Negligible: 'NEGLIGIBLE' -} as const; - -export type VulnerabilitySeverity = typeof VulnerabilitySeverity[keyof typeof VulnerabilitySeverity]; - - /** * VMClarityApi - axios parameter creator