UNPKG

kubernetes-models

Version:
31 lines (30 loc) 897 B
import { register } from "@kubernetes-models/validate"; import { addSchema as IoK8sApimachineryPkgUtilIntstrIntOrString } from "@kubernetes-models/apimachinery/_schemas/IoK8sApimachineryPkgUtilIntstrIntOrString"; const schema = { "properties": { "endPort": { "format": "int32", "type": "integer", "nullable": true }, "port": { "oneOf": [ { "$ref": "io.k8s.apimachinery.pkg.util.intstr.IntOrString#" }, { "type": "null" } ] }, "protocol": { "type": "string", "nullable": true } }, "type": "object" }; export function addSchema() { IoK8sApimachineryPkgUtilIntstrIntOrString(); register("io.k8s.api.networking.v1.NetworkPolicyPort", schema); }