Fix regression in JsonSchema/404 handler
81d523a7eeb2b5f9e066a9055faf436e7086873b
Move the JsonSchemas to be generated at runtime
And
8c623a96b43d69a4cfe95f9eac81be084d0a59b6
Handle redfish 404 with a good message
Have collided in merge conflicts. The 404 handler needs to be
registered last.
This patchset reorders the handlers, and leaves a note for the next
user. This probably needs a better handling so nobody falls into this
trap again, but for the moment, this should unbreak the build.
Tested:
curl -vvvv --insecure --user root:0penBmc https://192.168.7.2/redfish/v1/JsonSchemas/
No longer returns 404
Redfish service validator passes in qemu.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I7b56e8c17bad7bdca3ebf38be622502ebc35f1ca
diff --git a/redfish-core/lib/redfish_v1.hpp b/redfish-core/lib/redfish_v1.hpp
index 9f7935d..a9a786d 100644
--- a/redfish-core/lib/redfish_v1.hpp
+++ b/redfish-core/lib/redfish_v1.hpp
@@ -127,9 +127,6 @@
.methods(boost::beast::http::verb::get)(
std::bind_front(redfishGet, std::ref(app)));
- BMCWEB_ROUTE(app, "/redfish/<path>")
- (std::bind_front(redfish404, std::ref(app)));
-
BMCWEB_ROUTE(app, "/redfish/v1/JsonSchemas/<str>/")
.methods(boost::beast::http::verb::get)(
std::bind_front(jsonSchemaGet, std::ref(app)));
@@ -137,6 +134,10 @@
BMCWEB_ROUTE(app, "/redfish/v1/JsonSchemas/")
.methods(boost::beast::http::verb::get)(
std::bind_front(jsonSchemaIndexGet, std::ref(app)));
+
+ // Note, this route must always be registered last
+ BMCWEB_ROUTE(app, "/redfish/<path>")
+ (std::bind_front(redfish404, std::ref(app)));
}
} // namespace redfish