UNPKG

kubernetes-models

Version:
62 lines (61 loc) 1.76 kB
import { register } from "@kubernetes-models/validate"; import { addSchema as IoK8sApimachineryPkgApisMetaV1ObjectMeta } from "@kubernetes-models/apimachinery/_schemas/IoK8sApimachineryPkgApisMetaV1ObjectMeta"; import { addSchema as IoK8sApiBatchV1beta1CronJobSpec } from "./IoK8sApiBatchV1beta1CronJobSpec.mjs"; import { addSchema as IoK8sApiBatchV1beta1CronJobStatus } from "./IoK8sApiBatchV1beta1CronJobStatus.mjs"; const schema = { "properties": { "apiVersion": { "type": "string", "enum": [ "batch/v1beta1" ] }, "kind": { "type": "string", "enum": [ "CronJob" ] }, "metadata": { "oneOf": [ { "$ref": "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#" }, { "type": "null" } ] }, "spec": { "oneOf": [ { "$ref": "io.k8s.api.batch.v1beta1.CronJobSpec#" }, { "type": "null" } ] }, "status": { "oneOf": [ { "$ref": "io.k8s.api.batch.v1beta1.CronJobStatus#" }, { "type": "null" } ] } }, "type": "object", "required": [ "apiVersion", "kind" ] }; export function addSchema() { IoK8sApimachineryPkgApisMetaV1ObjectMeta(); IoK8sApiBatchV1beta1CronJobSpec(); IoK8sApiBatchV1beta1CronJobStatus(); register("io.k8s.api.batch.v1beta1.CronJob", schema); }