Added output format parser to the other services.
Same as for Route service, you can now specify either json or flatbuffers as output format for the other services (except Tile service, where it makes no sense).
This commit is contained in:
parent
59ca7840f4
commit
59a83bd537
@ -46,7 +46,7 @@ struct MatchParametersGrammar final : public RouteParametersGrammar<Iterator, Si
|
||||
"ignore", engine::api::MatchParameters::GapsType::Ignore);
|
||||
|
||||
root_rule =
|
||||
BaseGrammar::query_rule(qi::_r1) > -qi::lit(".json") >
|
||||
BaseGrammar::query_rule(qi::_r1) > BaseGrammar::format_rule(qi::_r1) >
|
||||
-('?' > (timestamps_rule(qi::_r1) | BaseGrammar::base_rule(qi::_r1) |
|
||||
(qi::lit("gaps=") >
|
||||
gaps_type[ph::bind(&engine::api::MatchParameters::gaps, qi::_r1) = qi::_1]) |
|
||||
|
@ -32,7 +32,7 @@ struct NearestParametersGrammar final : public BaseParametersGrammar<Iterator, S
|
||||
qi::uint_)[ph::bind(&engine::api::NearestParameters::number_of_results,
|
||||
qi::_r1) = qi::_1];
|
||||
|
||||
root_rule = BaseGrammar::query_rule(qi::_r1) > -qi::lit(".json") >
|
||||
root_rule = BaseGrammar::query_rule(qi::_r1) > BaseGrammar::format_rule(qi::_r1) >
|
||||
-('?' > (nearest_rule(qi::_r1) | BaseGrammar::base_rule(qi::_r1)) % '&');
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ struct TableParametersGrammar : public BaseParametersGrammar<Iterator, Signature
|
||||
|
||||
table_rule = destinations_rule(qi::_r1) | sources_rule(qi::_r1);
|
||||
|
||||
root_rule = BaseGrammar::query_rule(qi::_r1) > -qi::lit(".json") >
|
||||
root_rule = BaseGrammar::query_rule(qi::_r1) > BaseGrammar::format_rule(qi::_r1) >
|
||||
-('?' > (table_rule(qi::_r1) | base_rule(qi::_r1) | scale_factor_rule(qi::_r1) |
|
||||
fallback_speed_rule(qi::_r1) |
|
||||
(qi::lit("fallback_coordinate=") >
|
||||
|
@ -45,7 +45,7 @@ struct TripParametersGrammar final : public RouteParametersGrammar<Iterator, Sig
|
||||
qi::lit("destination=") >
|
||||
destination_type[ph::bind(&engine::api::TripParameters::destination, qi::_r1) = qi::_1];
|
||||
|
||||
root_rule = BaseGrammar::query_rule(qi::_r1) > -qi::lit(".json") >
|
||||
root_rule = BaseGrammar::query_rule(qi::_r1) > BaseGrammar::format_rule(qi::_r1) >
|
||||
-('?' > (roundtrip_rule(qi::_r1) | source_rule(qi::_r1) |
|
||||
destination_rule(qi::_r1) | BaseGrammar::base_rule(qi::_r1)) %
|
||||
'&');
|
||||
|
Loading…
Reference in New Issue
Block a user