return setValidationErrorsResponse();
if (!isVersion(V2))
return setUnknownVersionResponse();
BeanFactoryV2 factory = getBeanFactoryV2();
List<RouteV2Bean> beans = new ArrayList<RouteV2Bean>();
List<AgencyWithCoverageBean> agenciesWithCoverage = _service.getAgenciesWithCoverage();
for (AgencyWithCoverageBean agencyWithCoverage : agenciesWithCoverage)
{
String agencyId = agencyWithCoverage.getAgency().getId();
ListBean<RouteBean> routes = _service.getRoutesForAgencyId(agencyId);
for (RouteBean route : routes.getList())
beans.add(factory.getRoute(route));
}
return setOkResponse(factory.list(beans, false));
}