{
  "$id": "https://json.schemastore.org/behat.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {
    "title": "Profile name",
    "$ref": "#/definitions/profile"
  },
  "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": {
      "title": "Default profile",
      "$ref": "#/definitions/profile"
    },
    "imports": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    }
  },
  "title": "JSON schema for Behat configuration files",
  "type": "object"
}
