summaryrefslogtreecommitdiff
path: root/redfish-core/include/error_message_utils.hpp
blob: c4af95371e8fae28e01f3a25481b2750b0118946 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once
#include <nlohmann/json.hpp>

#include <string_view>

namespace redfish
{

namespace messages
{

constexpr const char* messageVersionPrefix = "Base.1.19.0.";
constexpr const char* messageAnnotation = "@Message.ExtendedInfo";

void moveErrorsToErrorJson(nlohmann::json& target, nlohmann::json& source);
void addMessageToJsonRoot(nlohmann::json& target,
                          const nlohmann::json& message);

void addMessageToJson(nlohmann::json& target, const nlohmann::json& message,
                      std::string_view fieldPath);

void addMessageToErrorJson(nlohmann::json& target,
                           const nlohmann::json& message);
} // namespace messages
} // namespace redfish