{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/drupal-routing/latest.json",
  "title": "JSON schema for Drupal routing file",
  "x-lintel": {
    "source": "https://www.schemastore.org/drupal-routing.json",
    "sourceSha256": "d7d6ca0e743a038951a170eca8129e428cd04b1dd3819dd0b4c71bb5e8b25441",
    "fileMatch": [
      "*.routing.yml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "route_callbacks": {
      "title": "List of callbacks to provide routes",
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    }
  },
  "additionalProperties": {
    "type": "object",
    "properties": {
      "path": {
        "title": "Route path",
        "type": "string"
      },
      "defaults": {
        "title": "Default route parameters",
        "type": "object",
        "properties": {
          "_controller": {
            "title": "A controller to execute when the route is matched",
            "type": "string"
          },
          "_form": {
            "type": "string"
          },
          "_title": {
            "type": "string"
          },
          "_title_callback": {
            "type": "string"
          },
          "_access": {
            "type": "string"
          },
          "_entity_list": {
            "type": "string"
          },
          "_entity_form": {
            "type": "string"
          },
          "_entity_view": {
            "type": "string"
          }
        }
      },
      "requirements": {
        "title": "List of requirements that makes a specific route only match under specific conditions",
        "type": "object",
        "properties": {
          "_access": {
            "type": "string"
          },
          "_custom_access": {
            "type": "string"
          },
          "_format": {
            "type": "string"
          },
          "_entity_access": {
            "type": "string"
          },
          "_entity_create_access": {
            "type": "string"
          },
          "_entity_delete_multiple_access": {
            "type": "string"
          },
          "_module_dependencies": {
            "type": "string"
          },
          "_csrf_token": {
            "type": "string"
          },
          "_user_is_logged_in": {
            "type": "string"
          },
          "_access_theme": {
            "type": "string"
          },
          "_permission": {
            "type": "string"
          }
        }
      },
      "methods": {
        "title": "Method of the incoming request to match the route",
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "GET",
            "POST",
            "PATCH",
            "PUT",
            "DELETE"
          ]
        },
        "uniqueItems": true
      },
      "options": {
        "title": "Additional route options",
        "type": "object",
        "properties": {
          "no_cache": {
            "type": "boolean"
          },
          "_admin_route": {
            "type": "boolean"
          },
          "_no_path": {
            "type": "boolean"
          },
          "_maintenance_access": {
            "type": "boolean"
          },
          "_node_operation_route": {
            "type": "boolean"
          },
          "parameters": {
            "type": "object"
          },
          "_auth": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          }
        }
      }
    },
    "additionalProperties": false
  }
}
