{
  "$id": "https://json.schemastore.org/drupal-services.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "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
          }
        }
      }
    }
  },
  "title": "JSON schema for Drupal services file",
  "type": "object"
}