To give meaning to our API responses, we need to annotate the routes with the available information.
Mainly we got stops and lines that need to be annotated, according to the information we report in our API.
Stops already offer the stop_info_table which can be constructed in a straight forward manor.
It still needs to be integrated with the PBF annotation:
[ ] use StopTable annotation to annotate stop names in PBF responses
The lines are a bit more complicated and require additional work.
We need to create a table storing all information for lines (namely the IDs of their colours (foreground + background, if available), as well as the headsign and the line name itself).
This information cannot be extracted directly from routes, since line-id does not directly translate to route. We need to extract the above information from routes and add a mapping that connects each line directly to its route to ensure that information is correctly retrievable.
[ ] implement mapping from line to route
[ ] build route-id based look-up table for line-names, headsign and colours
[ ] annotate
[ ] pbf response
[ ] api response
This will require some adjustments on the testing site, since fixtures will have to be updated.
To give meaning to our API responses, we need to annotate the routes with the available information. Mainly we got stops and lines that need to be annotated, according to the information we report in our API.
Stops already offer the stop_info_table which can be constructed in a straight forward manor. It still needs to be integrated with the PBF annotation:
The lines are a bit more complicated and require additional work. We need to create a table storing all information for lines (namely the IDs of their colours (foreground + background, if available), as well as the headsign and the line name itself).
This information cannot be extracted directly from
routes
, sinceline-id
does not directly translate to route. We need to extract the above information fromroutes
and add a mapping that connects eachline
directly to itsroute
to ensure that information is correctly retrievable.This will require some adjustments on the testing site, since fixtures will have to be updated.