{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Format for the assignment specification json for reference repositories.",
    "properties": {
        "assignment_name": {
            "description": "The identifier for this assignment in your course",
            "title": "Assignment Name schema",
            "type": "string"
        },
        "deadline": {
            "_format": "date-time",
            "default": "2017-02-14T23:59:00.00Z",
            "description": "The due date for the assignment",
            "title": "Deadline schema",
            "type": "string"
        },
        "expected_files": {
            "description": "Minimum files expected from student submissions",
            "items": {
                "description": "Ant-style path to a file or filename pattern, such as **/*.h or resources/foo.c",
                "title": "Expected File schema.",
                "type": "string"
            },
            "title": "Expected Files schema",
            "type": "array"
        },
        "maximum_group_size": {
            "default": 1,
            "description": "If students are allowed to work in groups, enter the max group size, otherwise enter 1.",
            "minimum": 1,
            "title": "Maximum Group Size schema",
            "type": "integer"
        },
        "ready": {
            "default": false,
            "description": "Whether this assignment is ready for students to start or not.",
            "title": "Ready schema",
            "type": "boolean"
        },
        "testables": {
            "description": "A list of logical test groups with common build outputs",
            "items": {
                "description": "A group of test cases sharing a common build command",
                "properties": {
                    "build_command": {
                        "default": "make",
                        "description": "A unix command that compiles/builds the project",
                        "title": "Build Command schema.",
                        "type": "string"
                    },
                    "test_cases": {
                        "description": "A list of test cases",
                        "items": {
                            "description": "An individual test case worth some amount of points",
                            "properties": {
                                "command": {
                                    "default": "echo 'Hello World'",
                                    "description": "A unix command to inspect output on",
                                    "title": "Command schema.",
                                    "type": "string"
                                },
                                "diff_source": {
                                    "default": "stdout",
                                    "description": "The file that contains test output for diff-ing",
                                    "title": "Diff Source schema.",
                                    "type": "string"
                                },
                                "expected": {
                                    "default": "generate",
                                    "description": "The path to the solution output, or 'generate' to have it generated",
                                    "title": "Expected schema.",
                                    "type": "string"
                                },
                                "hide_expected": {
                                    "default": true,
                                    "description": "Whether to hide the expected output from students when they fail this test case",
                                    "title": "Hide Expected schema.",
                                    "type": "boolean"
                                },
                                "kind": {
                                    "default": "diff",
                                    "description": "What kind of test case this is",
                                    "enum": [
                                        "diff"
                                    ],
                                    "title": "Kind schema.",
                                    "type": "string"
                                },
                                "points": {
                                    "default": 100,
                                    "description": "Point value for this test case",
                                    "title": "Points schema.",
                                    "type": "integer"
                                },
                                "timeout": {
                                    "default": 4,
                                    "description": "How long (in seconds) to let student code run",
                                    "title": "Timeout schema.",
                                    "type": "integer"
                                }
                            },
                            "required": [
                                "command",
                                "points",
                                "kind",
                                "hide_expected",
                                "diff_source",
                                "expected",
                                "timeout"
                            ],
                            "title": "Test Case schema.",
                            "type": "object"
                        },
                        "title": "Test Cases schema.",
                        "type": "array"
                    },
                    "test_name": {
                        "description": "Name of this test group",
                        "title": "Test Name schema.",
                        "type": "string"
                    }
                },
                "required": [
                    "test_name",
                    "build_command",
                    "test_cases"
                ],
                "title": "Testable schema.",
                "type": "object"
            },
            "title": "Testables schema.",
            "type": "array"
        },
        "uneditables": {
            "description": "Files that, when changed, revert to the given default",
            "items": {
                "description": "Ant-style path to a file or filename pattern, such as **/*.h or resources/foo.c",
                "title": "Uneditable File schema.",
                "type": "string"
            },
            "title": "Uneditables schema",
            "type": "array"
        }
    },
    "required": [
        "assignment_name",
        "maximum_group_size",
        "ready",
        "deadline",
        "expected_files",
        "uneditables",
        "testables"
    ],
    "title": "Assignment Spec schema.",
    "type": "object"
}