UNPKG

kubernetes-models

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