Skip to content

Commit

Permalink
use og json schema validator (#2)
Browse files Browse the repository at this point in the history
* update to original repo for json_schema_validator

* bugfix
  • Loading branch information
rpatters1 authored Jan 24, 2025
1 parent 5a79a30 commit ee064b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ set(JSON_VALIDATOR_BUILD_TESTS OFF CACHE BOOL "Do not build tests for json_schem
set(nlohmann_json_VERSION ${NLOHMANN_JSON_VERSION})
FetchContent_Declare(
json_schema_validator
GIT_REPOSITORY https://github.com/rpatters1/json-schema-validator.git # use my fork unless PR#338 is merged to upstream
GIT_TAG 010eba651fc2469f73ff132108747638e14f8cb0
GIT_REPOSITORY https://github.com/pboettch/json-schema-validator
GIT_TAG 40af3ec39670e768fc3f01f935140af311d71024
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)
FetchContent_MakeAvailable(json_schema_validator)
Expand Down
5 changes: 4 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ void processInputPathArg(const std::filesystem::path& rawInputPattern, MnxValida
inputFilePattern /= "*.*";
}
std::filesystem::path inputDir = inputFilePattern.parent_path();
bool inputIsOneFile = std::filesystem::is_regular_file(inputFilePattern);
if (inputDir.is_relative()) {
inputDir = std::filesystem::current_path() / inputDir;
}
bool inputIsOneFile = std::filesystem::is_regular_file(inputFilePattern);
if (!inputIsOneFile && !isSpecificFile && !mnxValidateContext.logFilePath.has_value()) {
mnxValidateContext.logFilePath = "";
}
Expand Down

0 comments on commit ee064b7

Please sign in to comment.