Zane Shelley | 5191bae | 2021-08-04 22:48:28 -0500 | [diff] [blame] | 1 | #include <nlohmann/json.hpp> |
| 2 | |
| 3 | #include <filesystem> |
| 4 | |
| 5 | namespace 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 | */ |
| 15 | void 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 | */ |
| 25 | bool validateJson(const nlohmann::json& i_schema, const nlohmann::json& i_json); |
| 26 | |
| 27 | } // namespace util |