{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/behat.json",
  "additionalProperties": {
    "$ref": "#/definitions/profile",
    "title": "Profile name"
  },
  "definitions": {
    "profile": {
      "title": "Profile",
      "type": "object",
      "properties": {
        "autoload": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "formatters": {
          "title": "How to format tests output",
          "default": "pretty",
          "type": "object",
          "properties": {
            "pretty": {
              "title": "Prints the feature as is",
              "type": "boolean"
            },
            "progress": {
              "title": "Prints one character per step",
              "type": "boolean"
            },
            "junit": {
              "title": "Outputs the failures in JUnit compatible files.",
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "suites": {
          "title": "Test suites",
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/suite"
          }
        },
        "extensions": {
          "title": "Behat extensions",
          "type": "object",
          "additionalProperties": {
            "type": "object"
          }
        }
      }
    },
    "suite": {
      "title": "Test suite",
      "type": "object",
      "properties": {
        "paths": {
          "title": "Paths to execute",
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true
        },
        "contexts": {
          "title": "Suite contexts",
          "type": "array",
          "items": {
            "type": ["string", "object"]
          },
          "uniqueItems": true
        },
        "filters": {
          "title": "Suite filters",
          "type": "object",
          "properties": {
            "tags": {
              "type": "string"
            },
            "role": {
              "type": "string"
            }
          }
        }
      }
    }
  },
  "properties": {
    "default": {
      "$ref": "#/definitions/profile",
      "title": "Default profile"
    },
    "imports": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    }
  },
  "title": "JSON schema for Behat configuration files",
  "type": "object"
}
