{
    "definitions": {
        "class": {
            "$schema": "http://json-schema.org/draft-04/schema",
            "definitions": {
                "course": {
                    "description": "a name of the course",
                    "example": "情報工学コース",
                    "type": [
                        "string"
                    ]
                },
                "department": {
                    "description": "a name of the department",
                    "example": "電気情報工学科",
                    "type": [
                        "string"
                    ]
                },
                "grade": {
                    "description": "grade of the class",
                    "example": 1,
                    "type": [
                        "integer"
                    ]
                },
                "id": {
                    "description": "unique identifier of class",
                    "example": "1e",
                    "type": [
                        "string"
                    ]
                },
                "identity": {
                    "$ref": "#/definitions/class/definitions/id"
                },
                "name": {
                    "description": "name of the class",
                    "example": "1E",
                    "type": [
                        "string"
                    ]
                }
            },
            "links": [
                {
                    "description": "Info for existing class.",
                    "href": "/api/v1/classes/{(%23%2Fdefinitions%2Fclass%2Fdefinitions%2Fid)}",
                    "method": "GET",
                    "rel": "self",
                    "title": "Info"
                },
                {
                    "description": "List existing classs.",
                    "href": "/api/v1/classes",
                    "method": "GET",
                    "rel": "instances",
                    "title": "List"
                }
            ],
            "properties": {
                "course": {
                    "$ref": "#/definitions/class/definitions/course"
                },
                "department": {
                    "$ref": "#/definitions/class/definitions/department"
                },
                "grade": {
                    "$ref": "#/definitions/class/definitions/grade"
                },
                "id": {
                    "$ref": "#/definitions/class/definitions/id"
                },
                "name": {
                    "$ref": "#/definitions/class/definitions/name"
                }
            },
            "title": "Class",
            "type": [
                "object"
            ]
        },
        "lecture": {
            "$schema": "http://json-schema.org/draft-04/schema",
            "definitions": {
                "code": {
                    "description": "the unique code of lecture",
                    "example": 2.014121002101231e21,
                    "type": [
                        "string"
                    ]
                },
                "id": {
                    "description": "unique identifier of lecture",
                    "example": 1,
                    "type": [
                        "string"
                    ]
                },
                "identity": {
                    "$ref": "#/definitions/lecture/definitions/id"
                },
                "lecturer": {
                    "description": "name of the lecture",
                    "example": "新井 イスマイル",
                    "type": [
                        "string"
                    ]
                },
                "name": {
                    "description": "name of the lecture",
                    "example": "プログラミング I",
                    "type": [
                        "string"
                    ]
                },
                "period": {
                    "description": "the preriod that lecture has taken",
                    "properties": {
                        "end_time": {
                            "description": "time when the period end",
                            "example": "10:30:00+09:00",
                            "type": [
                                "string"
                            ]
                        },
                        "start_time": {
                            "description": "time when the period start",
                            "example": "09:00:00+09:00",
                            "type": [
                                "string"
                            ]
                        },
                        "wday": {
                            "description": "wday when the period taken",
                            "example": 1,
                            "type": [
                                "integer"
                            ]
                        }
                    },
                    "type": [
                        "object"
                    ]
                },
                "special_target": {
                    "default": null,
                    "description": "the target of the lecture(overseasStudent or female)",
                    "example": "overseasStudent",
                    "type": [
                        "string"
                    ]
                }
            },
            "links": [
                {
                    "description": "Info for existing lectures.",
                    "href": "/api/v1/lectures/{(%2Fdefinitions%2Flecture%2Fdefinitions%2Fid)}",
                    "method": "GET",
                    "rel": "self",
                    "title": "Info"
                },
                {
                    "description": "List existing lectures.",
                    "href": "/api/v1/lectures",
                    "method": "GET",
                    "rel": "instances",
                    "title": "List"
                }
            ],
            "properties": {
                "code": {
                    "$ref": "#/definitions/lecture/definitions/code"
                },
                "course": {
                    "$ref": "#/definitions/class/definitions/course"
                },
                "department": {
                    "$ref": "#/definitions/class/definitions/department"
                },
                "grade": {
                    "$ref": "#/definitions/class/definitions/grade"
                },
                "id": {
                    "$ref": "#/definitions/lecture/definitions/id"
                },
                "lecturers": {
                    "items": {
                        "$ref": "#/definitions/lecture/definitions/lecturer"
                    },
                    "type": [
                        "array"
                    ]
                },
                "name": {
                    "$ref": "#/definitions/lecture/definitions/name"
                },
                "periods": {
                    "items": {
                        "$ref": "#/definitions/lecture/definitions/period"
                    },
                    "type": [
                        "array"
                    ]
                },
                "special_target": {
                    "$ref": "#/definitions/lecture/definitions/special_target"
                }
            },
            "title": "Lecture",
            "type": [
                "object"
            ]
        },
        "rescheduling": {
            "$schema": "http://json-schema.org/draft-04/schema",
            "definitions": {
                "category": {
                    "description": "variations of reschedulings(change, cancel, extra)",
                    "example": "change",
                    "type": [
                        "string"
                    ]
                },
                "id": {
                    "description": "unique identifier of the rescheduling",
                    "example": 1,
                    "type": [
                        "integer"
                    ]
                },
                "identity": {
                    "$ref": "#/definitions/rescheduling/definitions/id"
                },
                "period": {
                    "description": "the preriod that lecture has taken",
                    "properties": {
                        "end_time": {
                            "description": "time when the period end",
                            "example": "10:30:00+09:00",
                            "type": [
                                "string"
                            ]
                        },
                        "start_time": {
                            "description": "time when the period start",
                            "example": "09:00:00+09:00",
                            "type": [
                                "string"
                            ]
                        },
                        "taken_on": {
                            "description": "date when the period taken",
                            "example": "2014-12-10",
                            "type": [
                                "string"
                            ]
                        }
                    },
                    "type": [
                        "object"
                    ]
                }
            },
            "links": [
                {
                    "description": "List existing reschedulings.",
                    "href": "/api/v1/reschedulings",
                    "method": "GET",
                    "rel": "instances",
                    "title": "List"
                }
            ],
            "properties": {
                "after_period": {
                    "$ref": "#/definitions/rescheduling/definitions/period"
                },
                "before_period": {
                    "$ref": "#/definitions/rescheduling/definitions/period"
                },
                "category": {
                    "$ref": "#/definitions/rescheduling/definitions/category"
                },
                "id": {
                    "$ref": "#/definitions/rescheduling/definitions/id"
                },
                "lecture": {
                    "$ref": "#/definitions/lecture"
                }
            },
            "title": "Rescheduling",
            "type": [
                "object"
            ]
        }
    },
    "description": "A schema for ANCT reschedulings API",
    "links": [
        {
            "href": "actopus.akashi.ac.jp",
            "rel": "self"
        }
    ],
    "properties": {
        "class": {
            "$ref": "#/definitions/class"
        },
        "lecture": {
            "$ref": "#/definitions/lecture"
        },
        "rescheduling": {
            "$ref": "#/definitions/rescheduling"
        }
    },
    "title": "actopus API",
    "type": [
        "object"
    ]
}