blob: a80a50071b2886fb8656f62237b58b7cd1a04d91 [file] [log] [blame]
Feras Aldahlawi735ef6d2021-03-19 14:01:46 -07001#pragma once
2
3#include <app.hpp>
4#include <async_resp.hpp>
5#include <nlohmann/json.hpp>
6
7namespace crow
8{
9namespace google_api
10{
11
12inline void requestRoutes(App& app)
13{
14 BMCWEB_ROUTE(app, "/google/v1/")
15 .methods(boost::beast::http::verb::get)(
16 [](const crow::Request&,
17 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
18 asyncResp->res.jsonValue["@odata.type"] =
19 "#GoogleServiceRoot.v1_0_0.GoogleServiceRoot";
20 asyncResp->res.jsonValue["@odata.id"] = "/google/v1";
21 asyncResp->res.jsonValue["Id"] = "Google Rest RootService";
22 asyncResp->res.jsonValue["Name"] = "Google Service Root";
23 asyncResp->res.jsonValue["Version"] = "1.0.0";
24 });
25}
26
27} // namespace google_api
28} // namespace crow