2021-08-27 15:38:24 +03:00
|
|
|
{
|
|
|
|
"$schema": "http://json-schema.org/schema",
|
|
|
|
"title": "Train Info InfoFer Scrap Station Schema",
|
|
|
|
"description": "Results of scrapping InfoFer website for station arrival/departure info",
|
|
|
|
"definitions": {
|
|
|
|
"arrDepItem": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"time": {
|
|
|
|
"description": "Time of arrival/departure",
|
|
|
|
"type": "string",
|
|
|
|
"format": "date-time"
|
|
|
|
},
|
|
|
|
"train": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"rank": {
|
|
|
|
"type": "string",
|
|
|
|
"examples": [
|
|
|
|
"R",
|
|
|
|
"R-E",
|
|
|
|
"IR",
|
|
|
|
"IRN"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"number": {
|
|
|
|
"type": "string",
|
|
|
|
"examples": [
|
|
|
|
"74",
|
|
|
|
"15934"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"operator": {
|
|
|
|
"type": "string",
|
|
|
|
"examples": [
|
|
|
|
"CFR Călători",
|
|
|
|
"Softrans",
|
|
|
|
"Regio Călători"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"description": "All the stations the train stops at",
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"required": [
|
|
|
|
"rank",
|
|
|
|
"number",
|
|
|
|
"operator"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"stoppingTime": {
|
2021-08-27 22:06:02 +03:00
|
|
|
"description": "The number of seconds the train stops in the station",
|
2021-08-27 15:38:24 +03:00
|
|
|
"type": [
|
|
|
|
"integer",
|
|
|
|
"null"
|
|
|
|
],
|
2021-08-27 22:06:02 +03:00
|
|
|
"minimum": 0
|
2021-08-27 15:38:24 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"required": [
|
|
|
|
"time",
|
|
|
|
"train",
|
|
|
|
"stoppingTime"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"arrivals": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/arrDepItem"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"train": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"origin": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"required": ["origin"]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"required": ["train"]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"departures": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/arrDepItem"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"train": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"destination": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"required": ["destination"]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"required": ["train"]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"stationName": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"date": {
|
|
|
|
"description": "Date for which the data is provided (likely today)",
|
|
|
|
"type": "string",
|
|
|
|
"pattern": "^[0-9]{1,2}\\.[0-9]{2}\\.[0-9]{4}$"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"required": [
|
|
|
|
"arrivals",
|
|
|
|
"departures",
|
|
|
|
"stationName",
|
|
|
|
"date"
|
|
|
|
]
|
|
|
|
}
|