UNPKG

kubernetes-models

Version:
65 lines (64 loc) 1.84 kB
import { register } from "@kubernetes-models/validate"; import { addSchema as IoK8sApiDiscoveryV1Endpoint } from "./IoK8sApiDiscoveryV1Endpoint.mjs"; import { addSchema as IoK8sApimachineryPkgApisMetaV1ObjectMeta } from "@kubernetes-models/apimachinery/_schemas/IoK8sApimachineryPkgApisMetaV1ObjectMeta"; import { addSchema as IoK8sApiDiscoveryV1EndpointPort } from "./IoK8sApiDiscoveryV1EndpointPort.mjs"; const schema = { "properties": { "addressType": { "enum": [ "FQDN", "IPv4", "IPv6" ], "type": "string" }, "apiVersion": { "type": "string", "enum": [ "discovery.k8s.io/v1" ] }, "endpoints": { "items": { "$ref": "io.k8s.api.discovery.v1.Endpoint#" }, "type": "array" }, "kind": { "type": "string", "enum": [ "EndpointSlice" ] }, "metadata": { "oneOf": [ { "$ref": "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#" }, { "type": "null" } ] }, "ports": { "items": { "$ref": "io.k8s.api.discovery.v1.EndpointPort#" }, "type": "array", "nullable": true } }, "required": [ "addressType", "endpoints", "apiVersion", "kind" ], "type": "object" }; export function addSchema() { IoK8sApiDiscoveryV1Endpoint(); IoK8sApimachineryPkgApisMetaV1ObjectMeta(); IoK8sApiDiscoveryV1EndpointPort(); register("io.k8s.api.discovery.v1.EndpointSlice", schema); }