{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "SchedulesAndRoutes",
    "description": "Container for schedules and routes of transportation lines",
    "type": "object",
    "properties": {
        "lineTypeNames": {
            "description": "Names of all transit lines. The order is important because lines are represented by an index of its name in this array further",
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "streets": {
            "description": "Names of streets. The order is important because further a street is represented by an index of its name in this array",
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "texts": {
            "description": "Container for all texts that exist in legends of schedules",
            "title": "Texts",
            "type": "object",
            "properties": {
                "beginDateTexts": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "commentTexts": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "legendTexts": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "schedule": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "routes": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "code": {
                                    "type": "string"
                                },
                                "stops": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "string"
                                            },
                                            "legend": {
                                                "type": "object",
                                                "properties": {
                                                    "header": {
                                                        "type": "number"
                                                    },
                                                    "comment": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "number"
                                                        }
                                                    },
                                                    "legend": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "number"
                                                        }
                                                    }
                                                }
                                            },
                                            "min": {
                                                "type": "number"
                                            },
                                            "max": {
                                                "type": "number"
                                            },
                                            "schedulesByDays": {
                                                "type": "array",
                                                "items": {
                                                    "type": "object",
                                                    "properties": {
                                                        "dayType": {
                                                            "type": "number"
                                                        },
                                                        "departuresPerHour": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "description": "Information of all departures in the specified hour",
                                                                "properties": {
                                                                    "hour": {
                                                                        "type": "number",
                                                                        "description": "Hour of departure"
                                                                    },
                                                                    "departures": {
                                                                        "type": "array",
                                                                        "items": {
                                                                            "type": "object",
                                                                            "description": "Information about the departure in specified hour and minute",
                                                                            "properties": {
                                                                                "lowFloor": {
                                                                                    "type": "number",
                                                                                    "description": "Indicates if the vehicle has a low floor or not"
                                                                                },
                                                                                "symbols": {
                                                                                    "type": "array",
                                                                                    "description": "List of additional symbols for this departure. Symbol is represented by a number that is an index of element in SchedulesAndRoutes->texts->legendTexts array",
                                                                                    "items": {
                                                                                        "type": "number"
                                                                                    }
                                                                                },
                                                                                "minute": {
                                                                                    "type": "number",
                                                                                    "description": "Minute of departure time"
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            },
                                            "street": {
                                                "type": "number"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "type": {
                        "type": "number"
                    }
                }
            }
        }
    }
}