UNPKG

kubernetes-models

Version:
70 lines (69 loc) 1.98 kB
import { register } from "@kubernetes-models/validate"; import { addSchema as IoK8sApiDiscoveryV1beta1EndpointConditions } from "./IoK8sApiDiscoveryV1beta1EndpointConditions.mjs"; import { addSchema as IoK8sApiDiscoveryV1beta1EndpointHints } from "./IoK8sApiDiscoveryV1beta1EndpointHints.mjs"; import { addSchema as IoK8sApiCoreV1ObjectReference } from "./IoK8sApiCoreV1ObjectReference.mjs"; const schema = { "properties": { "addresses": { "items": { "type": "string" }, "type": "array" }, "conditions": { "oneOf": [ { "$ref": "io.k8s.api.discovery.v1beta1.EndpointConditions#" }, { "type": "null" } ] }, "hints": { "oneOf": [ { "$ref": "io.k8s.api.discovery.v1beta1.EndpointHints#" }, { "type": "null" } ] }, "hostname": { "type": "string", "nullable": true }, "nodeName": { "type": "string", "nullable": true }, "targetRef": { "oneOf": [ { "$ref": "io.k8s.api.core.v1.ObjectReference#" }, { "type": "null" } ] }, "topology": { "additionalProperties": { "type": "string" }, "type": "object", "nullable": true } }, "required": [ "addresses" ], "type": "object" }; export function addSchema() { IoK8sApiDiscoveryV1beta1EndpointConditions(); IoK8sApiDiscoveryV1beta1EndpointHints(); IoK8sApiCoreV1ObjectReference(); register("io.k8s.api.discovery.v1beta1.Endpoint", schema); }