kubernetes-models
Version:
44 lines (43 loc) • 1.67 kB
JavaScript
import { register } from "@kubernetes-models/validate";
import { addSchema as IoK8sApiFlowcontrolV1beta2FlowDistinguisherMethod } from "./IoK8sApiFlowcontrolV1beta2FlowDistinguisherMethod.mjs";
import { addSchema as IoK8sApiFlowcontrolV1beta2PriorityLevelConfigurationReference } from "./IoK8sApiFlowcontrolV1beta2PriorityLevelConfigurationReference.mjs";
import { addSchema as IoK8sApiFlowcontrolV1beta2PolicyRulesWithSubjects } from "./IoK8sApiFlowcontrolV1beta2PolicyRulesWithSubjects.mjs";
const schema = {
"properties": {
"distinguisherMethod": {
"oneOf": [
{
"$ref": "io.k8s.api.flowcontrol.v1beta2.FlowDistinguisherMethod#"
},
{
"type": "null"
}
]
},
"matchingPrecedence": {
"format": "int32",
"type": "integer",
"nullable": true
},
"priorityLevelConfiguration": {
"$ref": "io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationReference#"
},
"rules": {
"items": {
"$ref": "io.k8s.api.flowcontrol.v1beta2.PolicyRulesWithSubjects#"
},
"type": "array",
"nullable": true
}
},
"required": [
"priorityLevelConfiguration"
],
"type": "object"
};
export function addSchema() {
IoK8sApiFlowcontrolV1beta2FlowDistinguisherMethod();
IoK8sApiFlowcontrolV1beta2PriorityLevelConfigurationReference();
IoK8sApiFlowcontrolV1beta2PolicyRulesWithSubjects();
register("io.k8s.api.flowcontrol.v1beta2.FlowSchemaSpec", schema);
}