UNPKG

kubernetes-models

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