import { OpenAPIV3 } from 'openapi-types'; import { ApiObject } from './api-object.prm'; /** Describes a type using an OpenAPI v3 schema. */ export type OpenApiSchema = OpenAPIV3.BaseSchemaObject; /** * Describes a custom {@link ApiObject} type. * * @note The `ApiMetadata.name` for a CRD must be of the form `.); } /** * All recognized names for a CRD. */ export interface CrdNames { /** * The kind used to identify the {@link ApiObject} type described by this CRD. * This is later used in {@link ObjectKind} objects. * * @example HorizontalElasticityStrategy */ kind: string; /** * The kind of the list type used for retrieving/storing lists of the {@link ApiObject} type. * * @example HorizontalElasticityStrategyList */ listKind: string; /** * Lowercase singular version of the {@link ApiObject} type described by this CRD. * * @example horizontalelasticitystrategy */ singular: string; /** * Lowercase plural version of the {@link ApiObject} type described by this CRD. * * @example horizontalelasticitystrategies */ plural: string; /** * (optional) Short names of the {@link ApiObject} type described by this CRD for CLI usage. */ shortNames?: string[]; } /** * Describes the schema of a single version of a Custom Resource Definition. */ export interface CrdVersion { /** * Name of this CRD version. * * @example v1 */ name: string; /** * If `true`, this version is enabled. * If `false`, this version is disabled. */ served: boolean; /** * Only one version can be marked for storage. */ storage: boolean; /** * The schema of this CRD version. */ schema: CrdSchema; } /** * Stores the schema of a CRD. */ export interface CrdSchema { /** * The OpenAPI v3 schema of this CRD version. */ openAPIV3Schema: OpenApiSchema; } /** * Represents the definition of a custom {@link ApiObject} type. * * @note The `ApiMetadata.name` for a CRD must be of the form `. { spec: CustomResourceDefinitionSpec; constructor(initData?: Partial); }