{
  "description": "ValidationRules is a specification for a ValidationRules resource",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "properties": {
        "prefix": {
          "type": "string"
        },
        "validation_rules": {
          "additionalProperties": {
            "description": "Rule defines the structure for a single validation rule in the YAML.",
            "properties": {
              "ingresses": {
                "description": "ingresses where this rule can apply (ingress names)",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "namespaces": {
                "description": "namespaces where this rule can apply (namespace names)",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "order_priority": {
                "description": "Optional priority for sorting rules, bigger value has higher priority",
                "type": "integer"
              },
              "resources": {
                "description": "resources where this rule can apply (service, frontend)",
                "items": {
                  "type": "string"
                },
                "maxItems": 42,
                "type": "array"
              },
              "rule": {
                "type": "string"
              },
              "section": {
                "default": "backend",
                "enum": [
                  "frontend",
                  "backend",
                  "all"
                ],
                "type": "string"
              },
              "template": {
                "type": "string"
              },
              "type": {
                "description": "AnnType defines the type of annotation used in the validation rules.",
                "enum": [
                  "duration",
                  "int",
                  "uint",
                  "bool",
                  "string",
                  "float",
                  "json"
                ],
                "type": "string"
              }
            },
            "required": [
              "rule",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "object"
        }
      },
      "required": [
        "validation_rules"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
