{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "array",
    "items": {
        "type": "object",
        "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",
                    "properties": {
                        "args": {
                            "type": "object",
                            "minProperties": 1
                        },
                        "on": {
                            "type": "object",
                            "minProperties": 1,
                            "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"
                                }
                            },
                            "required": [
                                "method",
                                "url"
                            ]
                        },
                        "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
                                },
                                "bodySchemaFile": {
                                    "type": "string"
                                },
                                "bodySchemaURI": {
                                    "type": "string"
                                },
                                "absent": {
                                    "type": "array",
                                    "minItems": 1
                                }
                            },
                            "additionalProperties": false
                        },
                        "remember": {
                            "type": "object",
                            "minProperties": 1,
                            "properties": {
                                "body": {
                                    "type": "object",
                                    "minProperties": 1
                                },
                                "headers": {
                                    "type": "object",
                                    "minProperties": 1
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    "required": [
                        "on",
                        "expect"
                    ]
                }
            }
        },
        "required": [
            "calls"
        ]
    }
}