summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--redfish-core/include/schemas.hpp3
-rwxr-xr-xscripts/update_schemas.py6
2 files changed, 7 insertions, 2 deletions
diff --git a/redfish-core/include/schemas.hpp b/redfish-core/include/schemas.hpp
index 7302876572..99f6703a91 100644
--- a/redfish-core/include/schemas.hpp
+++ b/redfish-core/include/schemas.hpp
@@ -11,10 +11,11 @@
***************************************************************/
// clang-format off
#include <array>
+#include <string_view>
namespace redfish
{
- constexpr std::array schemas {
+ constexpr std::array<std::string_view,116> schemas {
"AccountService",
"ActionInfo",
"AggregationService",
diff --git a/scripts/update_schemas.py b/scripts/update_schemas.py
index bf395799e3..2e8487ded2 100755
--- a/scripts/update_schemas.py
+++ b/scripts/update_schemas.py
@@ -356,10 +356,14 @@ with open(os.path.join(cpp_path, "schemas.hpp"), "w") as hpp_file:
"{WARNING}\n"
"// clang-format off\n"
"#include <array>\n"
+ "#include <string_view>\n"
"\n"
"namespace redfish\n"
"{{\n"
- " constexpr std::array schemas {{\n".format(WARNING=WARNING)
+ " constexpr std::array<std::string_view,{SIZE}> schemas {{\n".format(
+ WARNING=WARNING,
+ SIZE=len(json_schema_files) + len(oem_schema_names),
+ )
)
for schema_file in json_schema_files:
hpp_file.write(' "{}",\n'.format(schema_file))