{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/bozr-suite-json/latest.json",
  "description": "Bozr test suite schema definition",
  "x-lintel": {
    "source": "https://www.schemastore.org/bozr.json",
    "sourceSha256": "91213487616a515d9388242cee1e4a18fc1ebee6c0520c2cc4f3eaa10ff011df",
    "fileMatch": [
      ".suite.json",
      ".xsuite.json"
    ],
    "parsers": [
      "json"
    ]
  },
  "type": "array",
  "items": {
    "type": "object",
    "required": [
      "calls"
    ],
    "properties": {
      "name": {
        "type": "string",
        "description": "Short name of the test that will be used in reports."
      },
      "description": {
        "type": "string",
        "description": "Long description of the test."
      },
      "ignore": {
        "type": "string",
        "description": "Ignore test due to a reason",
        "minLength": 10
      },
      "calls": {
        "type": "array",
        "items": {
          "type": "object",
          "required": [
            "on",
            "expect"
          ],
          "properties": {
            "args": {
              "type": "object",
              "minProperties": 1
            },
            "on": {
              "type": "object",
              "minProperties": 1,
              "required": [
                "method",
                "url"
              ],
              "properties": {
                "method": {
                  "type": "string",
                  "enum": [
                    "GET",
                    "POST",
                    "PUT",
                    "DELETE",
                    "HEAD",
                    "OPTIONS",
                    "PATCH",
                    "CONNECT",
                    "TRACE"
                  ]
                },
                "url": {
                  "type": "string"
                },
                "headers": {
                  "type": "object",
                  "minProperties": 1,
                  "properties": {
                    "Accept": {
                      "type": "string",
                      "enum": [
                        "application/json",
                        "application/xml",
                        "text/xml",
                        "text/csv"
                      ]
                    },
                    "Content-Type": {
                      "type": "string",
                      "enum": [
                        "application/json",
                        "application/xml",
                        "text/xml",
                        "text/csv"
                      ]
                    },
                    "Authorization": {
                      "type": "string"
                    }
                  }
                },
                "params": {
                  "type": "object",
                  "minProperties": 1
                },
                "body": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object"
                    }
                  ]
                },
                "bodyFile": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "expect": {
              "type": "object",
              "minProperties": 1,
              "properties": {
                "statusCode": {
                  "type": "integer",
                  "enum": [
                    200,
                    201,
                    202,
                    203,
                    204,
                    205,
                    206,
                    207,
                    208,
                    209,
                    226,
                    300,
                    301,
                    302,
                    303,
                    304,
                    305,
                    306,
                    307,
                    308,
                    400,
                    401,
                    402,
                    403,
                    404,
                    405,
                    406,
                    407,
                    408,
                    409,
                    410,
                    411,
                    412,
                    413,
                    414,
                    415,
                    416,
                    417,
                    418,
                    421,
                    422,
                    423,
                    424,
                    426,
                    428,
                    429,
                    431,
                    451,
                    500,
                    501,
                    502,
                    503,
                    504,
                    505,
                    506,
                    507,
                    508,
                    510,
                    511
                  ]
                },
                "contentType": {
                  "type": "string"
                },
                "headers": {
                  "type": "object",
                  "minProperties": 1
                },
                "body": {
                  "type": "object",
                  "minProperties": 1
                },
                "exactBody": {
                  "type": "object",
                  "minProperties": 1
                },
                "bodyPath": {
                  "type": "object",
                  "minProperties": 1
                },
                "bodySchemaFile": {
                  "type": "string"
                },
                "bodySchema": {
                  "type": "string"
                },
                "bodySchemaURI": {
                  "type": "string"
                },
                "absent": {
                  "type": "array",
                  "minItems": 1
                }
              },
              "additionalProperties": false
            },
            "remember": {
              "type": "object",
              "minProperties": 1,
              "properties": {
                "bodyPath": {
                  "type": "object",
                  "minProperties": 1
                },
                "headers": {
                  "type": "object",
                  "minProperties": 1
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        }
      }
    },
    "additionalProperties": false
  },
  "id": "https://json.schemastore.org/bozr.json"
}
