import { AbstractPlugin } from '../../common/AbstractPlugin.js'; import { ResourceParser } from '../../common/resourceParser.js'; import { ValidationResult } from '../../common/sarif.js'; import { CustomSchema, Resource, ValidateOptions } from '../../common/types.js'; import { SchemaLoader } from './schemaLoader.js'; export declare class KubernetesSchemaValidator extends AbstractPlugin { private resourceParser; private schemaLoader; private _settings; private ajv; private definitions; constructor(resourceParser: ResourceParser, schemaLoader: SchemaLoader); protected configurePlugin(rawSettings?: any): Promise; /** * Warm-up AJV's internal instance cache. * * @see https://ajv.js.org/guide/managing-schemas.html#using-ajv-instance-cache */ private warmup; doValidate(resources: Resource[], { incremental }: ValidateOptions): Promise; /** * Strict mode ensures that the Kubernetes schema got validated. * This prevents surprises when you apply it to the Kubernetes API server. * * Strict mode might get violated due to typo's in apiVersion/kind or missing schemas for CRDs. * Deprecated schemas are taken into account, as those are not _missing_ but _removed_ schemas. */ private validateStrictMode; registerCustomSchema({ kind, apiVersion, schema }: CustomSchema): void | Promise; unregisterCustomSchema(schema: Omit): void | Promise; private validateResource; /** * Get a validate function by deriving the fragment from the resource kind. * * @see https://stackoverflow.com/a/63909042 */ private getResourceValidator; private adaptToValidationResult; }