summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/update_schemas.py6
1 files changed, 5 insertions, 1 deletions
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))