Connection
Connection entity presents connection between two places. It could be footpath, indoor route, car or bike connection. It is needed if it is required to provide additional information how to reach one place from another. The information could be like distance, duration, guidances, etc.
Description
id
required
required
string
Unique identifier of the connection.
placeA
required
required
string
Unique identifier of the first place.
placeB
required
required
string
Unique identifier of the second place.
options
required
required
[]object
Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/vchezganov/cityvehiclespec/schema/connection.json",
"title": "Connection",
"type": "object",
"properties": {
"id": {
"description": "Unique identifier of the connection.",
"type": "string"
},
"placeA": {
"description": "Unique identifier of the first place.",
"type": "string"
},
"placeB": {
"description": "Unique identifier of the second place.",
"type": "string"
},
"options": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"kind": {
"description": "Kind of the connection option.",
"enum": [
"footpath",
"indoor",
"vehicle"
]
},
"distance": {
"description": "Distance between two places in meters.",
"type": "number"
},
"duration": {
"description": "Time required to reach another end in seconds.",
"type": "integer"
},
"guidance": {
"description": "List of instructions how to reach another place.",
"type": "object",
"properties": {
"forward": {
"description": "Instructions from start point to end point.",
"type": "array",
"items": {
"type": "string"
}
},
"backward": {
"description": "Instructions from end point to start point.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"required": [
"kind",
"distance"
]
}
}
},
"required": [
"id",
"placeA",
"placeB",
"options"
]
}