{
  "description": "ApisixRoute is defines configuration for HTTP and stream routes.",
  "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": {
      "description": "ApisixRouteSpec defines HTTP and stream route configuration.",
      "properties": {
        "http": {
          "description": "HTTP defines a list of HTTP route rules.\nEach rule specifies conditions to match HTTP requests and how to forward them.",
          "items": {
            "description": "ApisixRouteHTTP represents a single HTTP route configuration.",
            "properties": {
              "authentication": {
                "description": "Authentication holds authentication-related configuration for this route.",
                "properties": {
                  "enable": {
                    "description": "Enable toggles authentication on or off.",
                    "type": "boolean"
                  },
                  "jwtAuth": {
                    "description": "JwtAuth defines configuration for JWT authentication.",
                    "properties": {
                      "cookie": {
                        "description": "Cookie specifies the cookie name to look for the JWT token.",
                        "type": "string"
                      },
                      "header": {
                        "description": "Header specifies the HTTP header name to look for the JWT token.",
                        "type": "string"
                      },
                      "query": {
                        "description": "Query specifies the URL query parameter name to look for the JWT token.",
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "keyAuth": {
                    "description": "KeyAuth defines configuration for key authentication.",
                    "properties": {
                      "header": {
                        "description": "Header specifies the HTTP header name to look for the key authentication token.",
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "ldapAuth": {
                    "description": "LDAPAuth defines configuration for LDAP authentication.",
                    "properties": {
                      "base_dn": {
                        "description": "BaseDN is the base distinguished name (DN) for LDAP searches.",
                        "type": "string"
                      },
                      "ldap_uri": {
                        "description": "LDAPURI is the URI of the LDAP server.",
                        "type": "string"
                      },
                      "uid": {
                        "description": "UID is the user identifier attribute in LDAP.",
                        "type": "string"
                      },
                      "use_tls": {
                        "description": "UseTLS indicates whether to use TLS for the LDAP connection.",
                        "type": "boolean"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "type": {
                    "description": "Type specifies the authentication type.",
                    "type": "string"
                  }
                },
                "required": [
                  "enable",
                  "type"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "backends": {
                "description": "Backends lists potential backend services to proxy requests to.\nIf more than one backend is specified, the `traffic-split` plugin is used\nto distribute traffic according to backend weights.",
                "items": {
                  "description": "ApisixRouteHTTPBackend represents an HTTP backend (Kubernetes Service).",
                  "properties": {
                    "resolveGranularity": {
                      "description": "ResolveGranularity determines how the backend service is resolved.\nValid values are `endpoints` and `service`. When set to `endpoints`,\nindividual pod IPs will be used; otherwise, the Service's ClusterIP or ExternalIP is used.\nThe default is `endpoints`.",
                      "type": "string"
                    },
                    "serviceName": {
                      "description": "ServiceName is the name of the Kubernetes Service.\nCross-namespace references are not supported\u2014ensure the ApisixRoute\nand the Service are in the same namespace.",
                      "type": "string"
                    },
                    "servicePort": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "ServicePort is the port of the Kubernetes Service.\nThis can be either the port name or port number.",
                      "x-kubernetes-int-or-string": true
                    },
                    "subset": {
                      "description": "Subset specifies a named subset of the target Service.\nThe subset must be pre-defined in the corresponding ApisixUpstream resource.",
                      "type": "string"
                    },
                    "weight": {
                      "description": "Weight specifies the relative traffic weight for this backend.",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "serviceName",
                    "servicePort"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              },
              "match": {
                "description": "Match defines the HTTP request matching criteria.",
                "properties": {
                  "exprs": {
                    "description": "NginxVars defines match conditions based on Nginx variables.",
                    "items": {
                      "description": "ApisixRouteHTTPMatchExpr represents a binary expression used to match requests based on Nginx variables.",
                      "properties": {
                        "op": {
                          "description": "Op specifies the operator used in the expression.\nCan be `Equal`, `NotEqual`, `GreaterThan`, `GreaterThanEqual`, `LessThan`, `LessThanEqual`, `RegexMatch`,\n`RegexNotMatch`, `RegexMatchCaseInsensitive`, `RegexNotMatchCaseInsensitive`, `In`, or `NotIn`.",
                          "type": "string"
                        },
                        "set": {
                          "description": "Set provides a list of acceptable values for the expression.\nThis should be used when Op is `In` or `NotIn`.",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "subject": {
                          "description": "Subject defines the left-hand side of the expression.\nIt can be any [APISIX variable](https://apisix.apache.org/docs/apisix/apisix-variable) or string literal.",
                          "properties": {
                            "name": {
                              "description": "Name is the name of the header or query parameter.",
                              "type": "string"
                            },
                            "scope": {
                              "description": "Scope specifies the subject scope and can be `Header`, `Query`, or `Path`.\nWhen Scope is `Path`, Name will be ignored.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "scope"
                          ],
                          "type": "object",
                          "additionalProperties": false
                        },
                        "value": {
                          "description": "Value defines a single value to compare against the subject.\nThis should be used when Op is not `In` or `NotIn`.\nSet and Value are mutually exclusive\u2014only one should be set at a time.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "op",
                        "subject"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "type": "array"
                  },
                  "filter_func": {
                    "description": "FilterFunc is a user-defined function for advanced request filtering.\nThe function can use Nginx variables through the `vars` parameter.",
                    "type": "string"
                  },
                  "hosts": {
                    "description": "Hosts specifies Host header values to match.\nSupports exact and wildcard domains.\nOnly one level of wildcard is allowed (e.g., `*.example.com` is valid,\nbut `*.*.example.com` is not).",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "methods": {
                    "description": "Methods specifies the HTTP methods to match.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "paths": {
                    "description": "Paths is a list of URI path patterns to match.\nAt least one path must be specified.\nSupports exact matches and prefix matches.\nFor prefix matches, append `*` to the path, such as `/foo*`.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "remoteAddrs": {
                    "description": "RemoteAddrs is a list of source IP addresses or CIDR ranges to match.\nSupports both IPv4 and IPv6 formats.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "paths"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "name": {
                "description": "Name is the unique rule name and cannot be empty.",
                "type": "string"
              },
              "plugin_config_name": {
                "description": "PluginConfigName specifies the name of the plugin config to apply.",
                "type": "string"
              },
              "plugin_config_namespace": {
                "description": "PluginConfigNamespace specifies the namespace of the plugin config.\nDefaults to the namespace of the ApisixRoute if not set.",
                "type": "string"
              },
              "plugins": {
                "description": "Plugins lists additional plugins applied to this route.",
                "items": {
                  "description": "ApisixRoutePlugin represents an APISIX plugin.",
                  "properties": {
                    "config": {
                      "description": "Plugin configuration.",
                      "x-kubernetes-preserve-unknown-fields": true
                    },
                    "enable": {
                      "default": true,
                      "description": "Whether this plugin is in use, default is true.",
                      "type": "boolean"
                    },
                    "name": {
                      "description": "The plugin name.",
                      "type": "string"
                    },
                    "secretRef": {
                      "description": "Plugin configuration secretRef.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "enable",
                    "name"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              },
              "priority": {
                "description": "Priority defines the route priority when multiple routes share the same URI path.\nHigher values mean higher priority in route matching.",
                "type": "integer"
              },
              "timeout": {
                "description": "Timeout specifies upstream timeout settings.",
                "properties": {
                  "connect": {
                    "description": "Connect timeout for establishing a connection to the upstream.",
                    "type": "string"
                  },
                  "read": {
                    "description": "Read timeout for reading data from the upstream.",
                    "type": "string"
                  },
                  "send": {
                    "description": "Send timeout for sending data to the upstream.",
                    "type": "string"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "upstreams": {
                "description": "Upstreams references ApisixUpstream CRDs.",
                "items": {
                  "description": "ApisixRouteUpstreamReference references an ApisixUpstream CRD to be used as a backend.\nIt can be used in traffic-splitting scenarios or to select a specific upstream configuration.",
                  "properties": {
                    "name": {
                      "description": "Name is the name of the ApisixUpstream resource.",
                      "type": "string"
                    },
                    "weight": {
                      "description": "Weight is the weight assigned to this upstream.",
                      "type": "integer"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              },
              "websocket": {
                "description": "Websocket enables or disables websocket support for this route.",
                "type": "boolean"
              }
            },
            "required": [
              "name"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-map-keys": [
            "name"
          ],
          "x-kubernetes-list-type": "map"
        },
        "ingressClassName": {
          "description": "IngressClassName is the name of the IngressClass this route belongs to.\nIt allows multiple controllers to watch and reconcile different routes.",
          "type": "string"
        },
        "stream": {
          "description": "Stream defines a list of stream route rules.\nEach rule specifies conditions to match TCP/UDP traffic and how to forward them.",
          "items": {
            "description": "ApisixRouteStream defines the configuration for a Layer 4 (TCP/UDP) route. Currently not supported.",
            "properties": {
              "backend": {
                "description": "Backend specifies the destination service to which traffic should be forwarded.",
                "properties": {
                  "resolveGranularity": {
                    "default": "endpoint",
                    "description": "ResolveGranularity determines how the backend service is resolved.\nValid values are `endpoint` and `service`. When set to `endpoint`,\nindividual pod IPs will be used; otherwise, the Service's ClusterIP or ExternalIP is used.\nThe default is `endpoint`.",
                    "enum": [
                      "endpoint",
                      "service"
                    ],
                    "type": "string"
                  },
                  "serviceName": {
                    "description": "ServiceName is the name of the Kubernetes Service.\nCross-namespace references are not supported\u2014ensure the ApisixRoute\nand the Service are in the same namespace.",
                    "type": "string"
                  },
                  "servicePort": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "string"
                      }
                    ],
                    "description": "ServicePort is the port of the Kubernetes Service.\nThis can be either the port name or port number.",
                    "x-kubernetes-int-or-string": true
                  },
                  "subset": {
                    "description": "Subset specifies a named subset of the target Service.\nThe subset must be pre-defined in the corresponding ApisixUpstream resource.",
                    "type": "string"
                  }
                },
                "required": [
                  "serviceName",
                  "servicePort"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "match": {
                "description": "Match defines the criteria used to match incoming TCP or UDP connections.",
                "properties": {
                  "host": {
                    "description": "Host is the destination host address used to match the incoming TCP/UDP traffic.",
                    "type": "string"
                  },
                  "ingressPort": {
                    "description": "IngressPort is the port on which the APISIX Ingress proxy server listens.\nThis must be a statically configured port, as APISIX does not support dynamic port binding.",
                    "format": "int32",
                    "maximum": 65535,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "ingressPort"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "name": {
                "description": "Name is a unique identifier for the route. This field must not be empty.",
                "type": "string"
              },
              "plugins": {
                "description": "Plugins defines a list of plugins to apply to this route.",
                "items": {
                  "description": "ApisixRoutePlugin represents an APISIX plugin.",
                  "properties": {
                    "config": {
                      "description": "Plugin configuration.",
                      "x-kubernetes-preserve-unknown-fields": true
                    },
                    "enable": {
                      "default": true,
                      "description": "Whether this plugin is in use, default is true.",
                      "type": "boolean"
                    },
                    "name": {
                      "description": "The plugin name.",
                      "type": "string"
                    },
                    "secretRef": {
                      "description": "Plugin configuration secretRef.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "enable",
                    "name"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              },
              "protocol": {
                "description": "Protocol specifies the L4 protocol to match. Can be `TCP` or `UDP`.",
                "enum": [
                  "TCP",
                  "UDP"
                ],
                "type": "string"
              }
            },
            "required": [
              "backend",
              "match",
              "name",
              "protocol"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-map-keys": [
            "name"
          ],
          "x-kubernetes-list-type": "map"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "ApisixStatus is the status report for Apisix ingress Resources",
      "properties": {
        "conditions": {
          "items": {
            "description": "Condition contains details for one aspect of the current state of this API Resource.",
            "properties": {
              "lastTransitionTime": {
                "description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
                "maxLength": 32768,
                "type": "string"
              },
              "observedGeneration": {
                "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
                "format": "int64",
                "minimum": 0,
                "type": "integer"
              },
              "reason": {
                "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
                "maxLength": 1024,
                "minLength": 1,
                "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                "type": "string"
              },
              "status": {
                "description": "status of the condition, one of True, False, Unknown.",
                "enum": [
                  "True",
                  "False",
                  "Unknown"
                ],
                "type": "string"
              },
              "type": {
                "description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
                "maxLength": 316,
                "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "message",
              "reason",
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
