xref: /openbmc/bmcweb/features/redfish/lib/redfish_v1.hpp (revision 1e925c84be9c1786843e21077ac94a125ac1aa86)
14c25d66eSEd Tanous #pragma once
24c25d66eSEd Tanous 
34c25d66eSEd Tanous #include <app.hpp>
44c25d66eSEd Tanous #include <http_request.hpp>
54c25d66eSEd Tanous #include <http_response.hpp>
64c25d66eSEd Tanous 
74c25d66eSEd Tanous #include <string>
84c25d66eSEd Tanous 
94c25d66eSEd Tanous namespace redfish
104c25d66eSEd Tanous {
114c25d66eSEd Tanous 
124c25d66eSEd Tanous inline void requestRoutes(App& app)
134c25d66eSEd Tanous {
144c25d66eSEd Tanous     BMCWEB_ROUTE(app, "/redfish/")
154c25d66eSEd Tanous         .methods(boost::beast::http::verb::get)(
16*1e925c84SEd Tanous             [&app](const crow::Request& req,
174c25d66eSEd Tanous                    const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
18*1e925c84SEd Tanous                 if (!redfish::setUpRedfishRoute(app, req, asyncResp->res))
19*1e925c84SEd Tanous                 {
20*1e925c84SEd Tanous                     return;
21*1e925c84SEd Tanous                 }
221476687dSEd Tanous                 asyncResp->res.jsonValue["v1"] = "/redfish/v1/";
234c25d66eSEd Tanous             });
244c25d66eSEd Tanous }
254c25d66eSEd Tanous } // namespace redfish
26