blob: 52e8a2e5f20c54134a6c4e43e2a0769c1548b221 [file] [log] [blame]
Zane Shelley5191bae2021-08-04 22:48:28 -05001#include <nlohmann/json.hpp>
2
3#include <filesystem>
4
5namespace util
6{
7
8/**
9 * @brief Returns a list of files in the given directory, matching the given
10 * search string.
11 * @param i_dirPath The target directory.
12 * @param i_matchString Matching search pattern.
13 * @param o_foundPaths The returned list of found file paths.
14 */
15void findFiles(const std::filesystem::path& i_dirPath,
16 const std::string& i_matchString,
17 std::vector<std::filesystem::path>& o_foundPaths);
18
19/**
20 * @brief Validates the given JSON file against the given schema.
21 * @param i_schema Target schema document.
22 * @param i_json Target JSON file.
23 * @return True, if validation successful. False, otherwise.
24 */
25bool validateJson(const nlohmann::json& i_schema, const nlohmann::json& i_json);
26
27} // namespace util