<commit_before>{
  "$schema": "http://apicast.io/policy-v1/schema#manifest#",
  "name": "Edge limiting",
  "summary": "Adds rate limit.",
  "description": ["This policy adds rate limit."],
  "version": "builtin",
  "configuration": {
    "type": "object",
    "definitions": {
      "key": {
        "$id": "#/definitions/key",
        "description": "The key corresponding to the limiter object",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the key, must be unique in the scope"
          },
          "name_type": {
            "description": "How to evaluate 'name'",
            "type": "string",
            "default": "plain",
            "oneOf": [{
              "enum": ["plain"],
              "title": "Evaluate 'name' as plain text."
            }, {
              "enum": ["liquid"],
              "title": "Evaluate 'name' as liquid."
            }]
          },
          "scope": {
            "type": "string",
            "description": "Scope of the key",
            "default": "service",
            "oneOf": [{
              "enum": ["global"],
              "description": "Global scope, affecting to all services"
            }, {
              "enum": ["service"],
              "description": "Service scope, affecting to one service"
            }]
          }
        }
      },
      "error_handling": {
        "$id": "#/definitions/error_handling",
        "type": "string",
        "description": "How to handle an error",
        "default": "exit",
        "oneOf": [{
          "enum": ["exit"],
          "description": "Respond with an error"
        }, {
          "enum": ["log"],
          "description": "Let the request go through and only output logs"
        }]
      },
      "operation": {
        "type": "object",
        "$id": "#/definitions/operation",
        "properties": {
          "left": {
            "type": "string"
          },
          "op": {
            "type": "string",
            "enum": ["==", "!="]
          },
          "right": {
            "type": "string"
          },
          "left_type": {<commit_msg>policy/rate_limit: add matches operation to the schema<commit_after>{
  "$schema": "http://apicast.io/policy-v1/schema#manifest#",
  "name": "Edge limiting",
  "summary": "Adds rate limit.",
  "description": ["This policy adds rate limit."],
  "version": "builtin",
  "configuration": {
    "type": "object",
    "definitions": {
      "key": {
        "$id": "#/definitions/key",
        "description": "The key corresponding to the limiter object",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the key, must be unique in the scope"
          },
          "name_type": {
            "description": "How to evaluate 'name'",
            "type": "string",
            "default": "plain",
            "oneOf": [{
              "enum": ["plain"],
              "title": "Evaluate 'name' as plain text."
            }, {
              "enum": ["liquid"],
              "title": "Evaluate 'name' as liquid."
            }]
          },
          "scope": {
            "type": "string",
            "description": "Scope of the key",
            "default": "service",
            "oneOf": [{
              "enum": ["global"],
              "description": "Global scope, affecting to all services"
            }, {
              "enum": ["service"],
              "description": "Service scope, affecting to one service"
            }]
          }
        }
      },
      "error_handling": {
        "$id": "#/definitions/error_handling",
        "type": "string",
        "description": "How to handle an error",
        "default": "exit",
        "oneOf": [{
          "enum": ["exit"],
          "description": "Respond with an error"
        }, {
          "enum": ["log"],
          "description": "Let the request go through and only output logs"
        }]
      },
      "operation": {
        "type": "object",
        "$id": "#/definitions/operation",
        "properties": {
          "left": {
            "type": "string"
          },
          "op": {
            "description": "Operation to apply. The matches op supports PCRE (Perl compatible regular expressions)",
            "type": "string",
            "enum": ["==", "!=", "matches"]
          },
          "right": {
            "type": "string"
          },
          "left_type": {
{'fraction_non_alphanumeric': 0.17458563535911603, 'fraction_numerical': 0.0004419889502762431, 'mean_word_length': 1.5327364297705652, 'pattern_counts': {'":': 113, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '674660', 'n_tokens_mistral': 1231, 'n_tokens_neox': 1221, 'n_words': 332}