UNPKG

kubernetes-models

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