xref: /openbmc/bmcweb/features/redfish/lib/redfish_v1.hpp (revision 1e925c84be9c1786843e21077ac94a125ac1aa86)
1 #pragma once
2 
3 #include <app.hpp>
4 #include <http_request.hpp>
5 #include <http_response.hpp>
6 
7 #include <string>
8 
9 namespace redfish
10 {
11 
12 inline void requestRoutes(App& app)
13 {
14     BMCWEB_ROUTE(app, "/redfish/")
15         .methods(boost::beast::http::verb::get)(
16             [&app](const crow::Request& req,
17                    const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
18                 if (!redfish::setUpRedfishRoute(app, req, asyncResp->res))
19                 {
20                     return;
21                 }
22                 asyncResp->res.jsonValue["v1"] = "/redfish/v1/";
23             });
24 }
25 } // namespace redfish
26