UNPKG

kubernetes-models

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