1 #pragma once 2 3 #include <app.hpp> 4 #include <async_resp.hpp> 5 #include <nlohmann/json.hpp> 6 7 namespace crow 8 { 9 namespace google_api 10 { 11 12 inline 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 29