{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/mboats-config-0.2.json",
  "$ref": "#/definitions/MBOATS",
  "definitions": {
    "MBOATS": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "appId": {
          "type": "string",
          "default": "MBOAPPL",
          "description": "5-7 letter capitalized abbreviated word representing the application",
          "pattern": "^[\\w]{5,7}$"
        },
        "appName": {
          "type": "string",
          "default": "MBO Application",
          "description": "Application Name"
        },
        "pageLoadTimeout": {
          "type": "integer",
          "default": 60000,
          "minimum": 30000,
          "maximum": 120000
        },
        "elementFindTimeout": {
          "type": "integer",
          "default": 8,
          "minimum": 3,
          "maximum": 15
        },
        "soundfx": {
          "type": "boolean",
          "default": false
        },
        "headless": {
          "type": "boolean",
          "default": false
        },
        "invocationCount": {
          "type": "integer",
          "default": 1,
          "minimum": 1,
          "maximum": 5
        },
        "mode": {
          "type": "string",
          "default": "local",
          "enum": ["local", "remote"],
          "description": "The mode of test execution."
        },
        "runnerParallelism": {
          "type": "string",
          "default": "feature",
          "enum": ["feature", "scenario"]
        },
        "threadCount": {
          "type": "integer",
          "default": 1,
          "minimum": 1,
          "maximum": 5
        },
        "clients": {
          "type": "string",
          "default": "chrome",
          "enum": ["chrome", "firefox", "edge"]
        },
        "clientParallelism": {
          "type": "string",
          "default": "stacked",
          "enum": ["stacked", "interleaved"]
        },
        "video": {
          "$ref": "#/definitions/MBOATS/definitions/Video"
        },
        "networkLogs": {
          "$ref": "#/definitions/MBOATS/definitions/NetworkLogs"
        },
        "email": {
          "$ref": "#/definitions/MBOATS/definitions/Email"
        },
        "mongodb": {
          "$ref": "#/definitions/MBOATS/definitions/MongoDB"
        },
        "awss3": {
          "$ref": "#/definitions/MBOATS/definitions/AWSS3"
        },
        "awsec2": {
          "$ref": "#/definitions/MBOATS/definitions/AWSEC2"
        },
        "threadbare": {
          "$ref": "#/definitions/MBOATS/definitions/Threadbare"
        }
      },
      "required": ["appId", "appName"],
      "title": "MBOATS Framework Properties",
      "definitions": {
        "AWSEC2": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "publicName": {
              "type": "string"
            },
            "serverPort": {
              "type": "integer"
            }
          },
          "required": ["publicName", "serverPort"],
          "title": "AWS EC2 Configuration"
        },
        "AWSS3": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "accessKeyId": {
              "type": "string"
            },
            "secretAccessKey": {
              "type": "string"
            },
            "region": {
              "type": "string"
            },
            "bucket": {
              "type": "string"
            },
            "identityPoolId": {
              "type": "string"
            }
          },
          "required": [
            "accessKeyId",
            "bucket",
            "enabled",
            "identityPoolId",
            "region",
            "secretAccessKey"
          ],
          "title": "AWS S3 Configuration"
        },
        "CucumberOptions": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "featuresPath": {
              "type": "string"
            },
            "stepdefsPackage": {
              "type": "string"
            },
            "tagExpression": {
              "type": "string"
            }
          },
          "required": ["featuresPath", "stepdefsPackage", "tagExpression"],
          "title": "CucumberOptions"
        },
        "Email": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "auth": {
              "$ref": "#/definitions/MBOATS/definitions/Email/definitions/Auth"
            },
            "invitationLinkRegex": {
              "type": "string"
            },
            "oktaTokenRegex": {
              "type": "string"
            }
          },
          "required": ["auth", "invitationLinkRegex", "oktaTokenRegex"],
          "title": "Email Configuration",
          "definitions": {
            "Auth": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "$clientId": {
                  "type": "string"
                },
                "$clientSecret": {
                  "type": "string"
                },
                "$refreshToken": {
                  "type": "string"
                },
                "$refreshUrl": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": [
                "$clientId",
                "$clientSecret",
                "$refreshToken",
                "$refreshUrl"
              ],
              "title": "Auth"
            }
          }
        },
        "MongoDB": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "username": {
              "type": "string"
            },
            "password": {
              "type": "string"
            },
            "connectionString": {
              "type": "string"
            },
            "database": {
              "type": "string"
            },
            "collection": {
              "$ref": "#/definitions/MBOATS/definitions/MongoDB/definitions/Collection"
            }
          },
          "required": [
            "collection",
            "connectionString",
            "database",
            "enabled",
            "password",
            "username"
          ],
          "title": "MongoDB Configuration",
          "definitions": {
            "Collection": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "report": {
                  "type": "string"
                }
              },
              "required": ["report"],
              "title": "Collection"
            }
          }
        },
        "NetworkLogs": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "request": {
              "$ref": "#/definitions/MBOATS/definitions/NetworkLogs/definitions/Request"
            },
            "response": {
              "$ref": "#/definitions/MBOATS/definitions/NetworkLogs/definitions/Request"
            }
          },
          "required": ["enabled", "request", "response"],
          "title": "NetworkLogs",
          "definitions": {
            "Request": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "headers": {
                  "type": "boolean"
                },
                "cookies": {
                  "type": "boolean"
                },
                "body": {
                  "type": "boolean"
                }
              },
              "required": ["body", "cookies", "headers"],
              "title": "Request"
            }
          }
        },
        "Threadbare": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "server": {
              "type": "null"
            }
          },
          "required": ["server"],
          "title": "Threadbare Configuration"
        },
        "Video": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "location": {
              "type": "string"
            },
            "format": {
              "type": "string"
            },
            "prefix": {
              "type": "string"
            }
          },
          "required": ["enabled", "format", "location", "prefix"],
          "title": "Video"
        }
      }
    }
  }
}
