Commit Graph

21 Commits

Author SHA1 Message Date
Cristian Le
0d60d48a58
Modernize cmake script (#262)
* Remove travis file
* Apply pre-commit fixes
* Modernize cmake file

- Added JSON_VALIDATOR_SHARED_LIBS to properly handle shared-library
- Bumped minimum cmake to 3.11 to use no-source add_library
- Bumped minimum cmake to 3.14 to properly support FetchContent (FetchContent_MakeAvailable)
- Converted Hunter package manager to FetchContent (It is plenty mature these days)
- Added namespace to exported target
- Made the cmake file compatible with FetchContent

* Use simplified FetchContent CI
* Add simple status messages
* Handle nlohmann dependency

Not an ideal approach, but required in order for the exported target to have appropriate linkage.
Maybe this can be designed to become a PRIVATE link library, but then how does it ensure the target is installed?

* Remove CMake-install test

This will be moved to packaging integration tests

* Enable code coverage

* Reconfigure ci presets

Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2023-05-11 12:07:56 +02:00
Gene Hightower
fd622c040b Use Ragel generated RFC-5321/RFC-6531 parsrr
Mailbox address parser from <https://github.com/gene-hightower/smtp-address-validator>
2022-11-26 17:51:37 +01:00
sebasfalcone
56bb4a4af4 CL: Restored CMakeLists to original state 2022-10-29 19:03:36 +02:00
sebasfalcone
f24f8f4203 CL: removed uri from WILL_FAIL list 2022-10-29 19:03:36 +02:00
Leon De Andrade
4ebc6c2334 Feature: Add uuid format-string support 2021-09-08 15:34:08 +02:00
Patrick Boettcher
efb0a3127b update to latest JSON-Schema-Test-Suite 2021-09-06 16:20:26 +02:00
Patrick Boettcher
b4733c50c1 update to latest JSON-schema-tests, with some fixes 2021-06-10 11:02:41 +02:00
Patrick Boettcher
5ef4f903af add content-checker-callback
Used when contentEncoding or mediaType attributes are present
on a string-value.
2020-07-13 11:12:48 +02:00
Patrick Boettcher
27fc1d0945 ignore (new) failing errors from test-suite 2020-05-15 10:04:12 +02:00
Patrick Boettcher
ccc366e850 update Test-Suite to make it work with nlohmann::json 2020-05-15 10:03:48 +02:00
Patrick Boettcher
be1792d095 update JSON-Schema-Test-Suite to 2.0.0-175-g7ba95f3 2020-05-15 09:56:42 +02:00
Luke Kersting
8a7d1d3fde Adapt CMake project name to be coherent with nlohmann::json's naming
Now when json-schema-validator is installed CMake config files are installed in the lib/cmake/json-schema-validator directory.
The install json-schema-validatorTargets.cmake file properly imports the json-hpp and json-schema-validator libraries.
The install json-schema-validatorConfig.cmake file is used by CMake find_package function to include the json-schema-validatorTargets.cmake file and to set the variable JSON_SCHEMA_VALIDATOR_INCLUDE_DIRS to the install include directory.
To use find_package to find the json-schema-validator simply include.
A new test (test_cmake_install) has been added.

When NLohmann's JSON is install with CMake, it follows a certain
naming convention.

As we learned to do proper CMake-install thanks to @lkersting's work
this project now adapts to the way NLohmann is doing it. Namely:

- json-schema.hpp is now located (and installed)
  in a nlohmann/-subdirectory
- the CMake library and project's name is now
  nlohmann_json_schema_validator

Instead of doing non-standard acrobatics to find the json.hpp
now find_package is used in order to find NLohmann's package

Co-Authored-By: Patrick Boettcher <p@yai.se>
2019-12-05 11:12:23 +01:00
mxmlnkn
ad8f158284 add support for some built-in string format specifiers: date-time, date, time, ipv4, ipv6 2019-12-03 16:28:54 +01:00
Patrick Boettcher
2d7f190550 update to latest JSON-Schema-Test-Suite 2019-11-27 14:00:48 +01:00
Patrick Boettcher
3ec0e69a0b Add support for plain-name-fragment
Plain-name-fragments are something like

    file.json#plain

plain here is not a JSON-pointer but a
Location-independent Identifier or plain-name.

Fixes #72
2019-10-23 14:46:34 +02:00
Patrick Boettcher
247c2edbee update to latest JSON Schema Test suite (except for the ref-test) 2019-10-22 16:20:18 +02:00
Patrick Boettcher
99e05c8335 Update to latest JSON-Schema-Test-Suite
15ba997f9b937150a0ab88244d1d0fbf58526c48
2019-04-02 11:39:55 +02:00
Patrick Boettcher
1e50a93626 Fix #44: format-checker-callback was not used, is now 2019-01-13 18:05:44 +01:00
Patrick Boettcher
7beb40bc61 Complete rewrite of the validator - aiming a 2.0-release
Schema a now "parsed" into C++-validator-objects in a first
step and then validation takes place with these objects.

Errors are now handled via a user-provided error-handler
allowing the user to collect all errors at once or bail out
when a certain threshold is reached. Fixes #36 and #8.

One (sub-)schema can now be referenced with different URIs. Fixes #9

JSON schema draft 7 is now supported. Fixes #35
2018-12-27 16:59:19 +01:00
Patrick Boettcher
16aa1c05c7 tests: test for explicit false exclusivity 2018-04-24 18:48:26 +02:00
Patrick Boettcher
57f7809532 tests: add draft4-tests from json-schema-test-suite to this repo 2018-04-18 11:49:36 +02:00