Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,13 @@ include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
# Disable clang-tidy for the external projects
set(CMAKE_CXX_CLANG_TIDY "")

# Nlohmann JSON

set(JSON_BuildTests OFF)
set(JSON_Install ON)
add_subdirectory(external/json)
include_directories(SYSTEM external/json/include/)

# We need to work around the behavior of nlohmann_json_schema_validator and nlohmann_json here
# The validator needs the json part, but if you include it, the library of nlohmann_json_schema_validator
# is not installed, leading to linker error. But just including nlohmann_json is not sufficient, as
Expand All @@ -195,25 +202,15 @@ set(CMAKE_CXX_CLANG_TIDY "")
#Override option of nlohmann_json_schema_validator to not build its tests
set(BUILD_TESTS OFF CACHE BOOL "Build json-schema-validator-tests")

# Make nlohmann_json_schema_validator happy by telling it how to find the single include of nlohmann_json
include_directories(SYSTEM external/json/single_include/)

if (PHASAR_IN_TREE)
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS nlohmann_json_schema_validator)
endif()

set(nlohmann_json_DIR ${PHASAR_SRC_DIR}/external/json/single_include/)

# Json Schema Validator
set(JSON_VALIDATOR_INSTALL ON)
add_subdirectory(external/json-schema-validator)
include_directories(SYSTEM external/json-schema-validator/src/)

# now we finally add the subdirectory
set(JSON_BuildTests OFF)
set(JSON_Install ON)
add_subdirectory(external/json)

# Googletest
if (NOT PHASAR_IN_TREE)
add_subdirectory(external/googletest EXCLUDE_FROM_ALL)
Expand Down
2 changes: 1 addition & 1 deletion external/googletest
Submodule googletest updated 237 files
2 changes: 1 addition & 1 deletion external/json
Submodule json updated 1123 files
2 changes: 1 addition & 1 deletion external/json-schema-validator
Submodule json-schema-validator updated 80 files
+83 −0 .github/workflows/github-actions.yml
+10 −1 .travis.yml
+66 −94 CMakeLists.txt
+105 −51 README.md
+54 −0 app/format.cpp
+1 −1 app/json-schema-validate.cpp
+539 −0 cmake/HunterGate.cmake
+25 −11 conanfile.py
+7 −11 nlohmann_json_schema_validatorConfig.cmake.in
+4 −4 src/json-patch.cpp
+1 −1 src/json-uri.cpp
+297 −103 src/json-validator.cpp
+14 −14 src/nlohmann/json-schema.hpp
+830 −0 src/smtp-address-validator.cpp
+34 −0 src/smtp-address-validator.hpp
+188 −95 src/string-format-check.cpp
+18 −0 test/CMakeLists.txt
+3 −5 test/JSON-Schema-Test-Suite/CMakeLists.txt
+46 −1 test/JSON-Schema-Test-Suite/json-schema-test.cpp
+3 −0 test/JSON-Schema-Test-Suite/remotes/baseUriChange/folderInteger.json
+3 −0 test/JSON-Schema-Test-Suite/remotes/baseUriChangeFolder/folderInteger.json
+3 −0 test/JSON-Schema-Test-Suite/remotes/baseUriChangeFolderInSubschema/folderInteger.json
+11 −0 test/JSON-Schema-Test-Suite/remotes/ref-and-definitions.json
+11 −0 test/JSON-Schema-Test-Suite/remotes/ref-and-defs.json
+65 −3 test/JSON-Schema-Test-Suite/tests/draft7/additionalItems.json
+1 −1 test/JSON-Schema-Test-Suite/tests/draft7/additionalProperties.json
+50 −0 test/JSON-Schema-Test-Suite/tests/draft7/allOf.json
+100 −0 test/JSON-Schema-Test-Suite/tests/draft7/const.json
+50 −0 test/JSON-Schema-Test-Suite/tests/draft7/contains.json
+30 −0 test/JSON-Schema-Test-Suite/tests/draft7/default.json
+2 −8 test/JSON-Schema-Test-Suite/tests/draft7/definitions.json
+26 −0 test/JSON-Schema-Test-Suite/tests/draft7/enum.json
+136 −136 test/JSON-Schema-Test-Suite/tests/draft7/format.json
+53 −0 test/JSON-Schema-Test-Suite/tests/draft7/id.json
+70 −0 test/JSON-Schema-Test-Suite/tests/draft7/if-then-else.json
+36 −0 test/JSON-Schema-Test-Suite/tests/draft7/infinite-loop-detection.json
+16 −0 test/JSON-Schema-Test-Suite/tests/draft7/maxProperties.json
+11 −0 test/JSON-Schema-Test-Suite/tests/draft7/multipleOf.json
+11 −23 test/JSON-Schema-Test-Suite/tests/draft7/optional/bignum.json
+96 −17 test/JSON-Schema-Test-Suite/tests/draft7/optional/ecmascript-regex.json
+13 −0 test/JSON-Schema-Test-Suite/tests/draft7/optional/float-overflow.json
+20 −0 test/JSON-Schema-Test-Suite/tests/draft7/optional/format/date-time.json
+171 −1 test/JSON-Schema-Test-Suite/tests/draft7/optional/format/date.json
+35 −0 test/JSON-Schema-Test-Suite/tests/draft7/optional/format/email.json
+35 −0 test/JSON-Schema-Test-Suite/tests/draft7/optional/format/hostname.json
+10 −0 test/JSON-Schema-Test-Suite/tests/draft7/optional/format/idn-email.json
+246 −0 test/JSON-Schema-Test-Suite/tests/draft7/optional/format/idn-hostname.json
+21 −0 test/JSON-Schema-Test-Suite/tests/draft7/optional/format/ipv4.json
+135 −0 test/JSON-Schema-Test-Suite/tests/draft7/optional/format/ipv6.json
+1 −1 test/JSON-Schema-Test-Suite/tests/draft7/optional/format/iri.json
+15 −0 test/JSON-Schema-Test-Suite/tests/draft7/optional/format/relative-json-pointer.json
+146 −1 test/JSON-Schema-Test-Suite/tests/draft7/optional/format/time.json
+6 −1 test/JSON-Schema-Test-Suite/tests/draft7/optional/format/uri.json
+85 −0 test/JSON-Schema-Test-Suite/tests/draft7/optional/format/uuid.json
+146 −0 test/JSON-Schema-Test-Suite/tests/draft7/optional/unicode.json
+0 −15 test/JSON-Schema-Test-Suite/tests/draft7/optional/zeroTerminatedFloats.json
+5 −0 test/JSON-Schema-Test-Suite/tests/draft7/patternProperties.json
+29 −0 test/JSON-Schema-Test-Suite/tests/draft7/propertyNames.json
+202 −33 test/JSON-Schema-Test-Suite/tests/draft7/ref.json
+28 −3 test/JSON-Schema-Test-Suite/tests/draft7/refRemote.json
+41 −1 test/JSON-Schema-Test-Suite/tests/draft7/uniqueItems.json
+56 −0 test/JSON-Schema-Test-Suite/tests/draft7/unknownKeyword.json
+175 −0 test/binary-validation.cpp
+69 −0 test/issue-117-format-error.cpp
+13 −0 test/issue-143/CMakeLists.txt
+4 −0 test/issue-143/instance-fail-1.json
+4 −0 test/issue-143/instance-fail-a.json
+4 −0 test/issue-143/instance.json
+21 −0 test/issue-143/schema.json
+93 −0 test/issue-149-entry-selection.cpp
+109 −0 test/issue-189-default-values.cpp
+3 −0 test/issue-209/CMakeLists.txt
+8 −0 test/issue-209/color.schema.json
+16 −0 test/issue-209/entities.schema.json
+10 −0 test/issue-209/instance.json
+133 −59 test/issue-25-default-values.cpp
+2 −1 test/issue-98.cpp
+18 −1 test/string-format-check-test.cpp
+1 −1 test/test-pipe-in.sh
+2 −2 test/uri.cpp