{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/drupal-services/latest.json",
  "title": "JSON schema for Drupal services file",
  "x-lintel": {
    "source": "https://www.schemastore.org/drupal-services.json",
    "sourceSha256": "b306e944e463cccfbe7a05b8302d6c5cbbef3115e9111d84cfac656d1dd9bc16",
    "fileMatch": [
      "*.services.yml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "parameters": {
      "title": "Service parameters",
      "type": "object"
    },
    "services": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "class": {
            "title": "Service class",
            "type": "string"
          },
          "parent": {
            "title": "Parent service to extend",
            "type": "string"
          },
          "factory": {
            "title": "A factory to create the object",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array"
              }
            ]
          },
          "decorates": {
            "title": "Service name to decorate",
            "type": "string"
          },
          "deprecated": {
            "title": "A flag indicating that the service is deprecated",
            "type": "string"
          },
          "lazy": {
            "title": "Lazy service instantiation",
            "type": "boolean"
          },
          "shared": {
            "title": "Shared service",
            "type": "boolean"
          },
          "abstract": {
            "title": "Abstract service",
            "type": "boolean"
          },
          "public": {
            "title": "A flag indication that the service cannot be accessed directly from the container object",
            "type": "boolean"
          },
          "alias": {
            "title": "A shortcut to access some services",
            "type": "string"
          },
          "arguments": {
            "title": "Service arguments",
            "type": "array",
            "uniqueItems": true
          },
          "configurator": {
            "title": "A callable to configure a service after its instantiation",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "title": "List of tags tell Drupal that your service can be processed in some special way",
            "examples": [
              "event_subscriber",
              "service_collector",
              "theme_negotiator",
              "twig.extension",
              "access_check"
            ],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "call": {
                  "type": "string"
                },
                "alias": {
                  "type": "string"
                },
                "required": {
                  "type": "boolean"
                },
                "tag": {
                  "type": "string"
                },
                "priority": {
                  "type": "integer"
                },
                "default_backend": {
                  "type": "string"
                },
                "responder": {
                  "type": "boolean"
                },
                "format": {
                  "type": "string"
                },
                "applies_to": {
                  "type": "string"
                },
                "provider_id": {
                  "type": "string"
                },
                "needs_incoming_request": {
                  "type": "boolean"
                },
                "scheme": {
                  "type": "string"
                }
              }
            }
          },
          "calls": {
            "title": "Methods to set optional dependencies",
            "type": "array",
            "uniqueItems": true
          }
        }
      }
    }
  },
  "additionalProperties": false
}
