Commit Graph

246 Commits

Author SHA1 Message Date
andrejlevkovitch
396ffbb663 fix: issue-311
Fixes #311
2024-02-05 14:17:01 +01:00
bvstrien
0034c11347
Fix cmake install target on windows (#315)
* Fix cmake install target on windows

Install the dll to the bin directory, instead of a non-existent CMAKE_INSTALL_RUNTIMEDIR.

* Combine install targets

The only difference was the `RUNTIME DESTINATION` for windows. Since
that is set to the default path, they can use the same definition.
2024-01-31 11:54:34 +01:00
Cristian Le
dd6b2eda2f
[Temp] Disable clang-tidy (#316)
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2024-01-31 11:38:21 +01:00
Patrick Boettcher
08d8a52a8a fix indentation 2023-11-27 12:48:21 +01:00
Patrick Boettcher
74931bd02a error-messages: Numeric limit errors should show maximum precision
Fixes #255
2023-11-27 11:12:23 +01:00
Cristian Le
3f6376dd6a Add simple import tests
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2023-11-27 10:26:08 +01:00
Cristian Le
1f0eb98af5 Initialize packit workflow
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2023-11-27 10:26:08 +01:00
Jacob Crabill
704a54552d Improve and fix bugs in Conanfile
- Fix issues with Conanfile - create a package which can be consumed by
  downstream Conan packages
- TODO: Add standard Conan workflow instructions to README
2023-11-27 10:24:16 +01:00
Patrick Boettcher
349cba9f7e version 2.3.0
(and CMakeLists whitespace changes)
2023-11-27 10:20:26 +01:00
dhmemi
e3aa397f41
fix: validate multipleOf fails on float-point value (#295)
* fix: validate multipleOf fails on float-point value

* make clang-tidy happy.

* fix test case error when multipleOf is float but number is int

* fix multiple of float number
2023-11-20 13:48:18 +01:00
GerritNG
c6fefb80fb
Update README.md (#301) 2023-10-18 18:55:19 +02:00
andrejlevkovitch
0be4d4c4b5
do not fetch nlohmann_json if it already added in main project (#287) 2023-09-22 16:12:57 +02:00
Sylvain Joubert
79535fe0b6
Fix performance regression from logical combination patch discard (#288)
A recent fix to discard patch from invalid logical combination
introduced a lot (for large json instance and/or schema) of copies to
make a patch backup. On some case, this introduced up to a 100x slower
validation time.

Resizing the patch object to its previous size avoid unnecessary
temporary allocations from the backup object.
2023-09-22 16:03:55 +02:00
ss
2143027c7f
Fix Clang compiler warnings (#290) 2023-09-22 15:59:39 +02:00
Patrick Boettcher
848bf758c7
use cmake 3.25 for runners (#296) 2023-09-22 15:28:07 +02:00
David Davies
f4194d7e24
Enable boost regex usage for string-format-check.cpp (#286) 2023-07-13 19:54:44 +02:00
ss
693b74eddf
Fix code coverage for smtp-address-validator.cpp (#284)
Fixes #283
2023-07-11 19:02:02 +02:00
Patrick Boettcher
6db2ee1f5a Revert "Replace the full nlohmann_json repo with a fetch_content variant. (#279)"
This reverts commit 540a7e3dd4.
2023-07-07 12:40:52 +02:00
Didier BRIZET
8912ad3490
Cancel patch change for each non valid logical combination (#231)
* Cancel patch change for each non valid logical combination

* Update CMakeLists.txt

---------

Co-authored-by: Patrick Boettcher <p@yai.se>
2023-07-04 13:03:37 +02:00
eike-fokken
540a7e3dd4
Replace the full nlohmann_json repo with a fetch_content variant. (#279)
During the configuring of json-schema-validator, the repository
nlohmann_json is fetched via the fetch_content functionality of CMake.
It is a huge repository with size 180MB, which are downloaded whenever
one configures CMake on an empty build directory (e.g. after deleting the
build directory to clear out cached CMake variables.)
The repository
https://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent

only contains releases instead of all development commits and has
(at the moment) size of only 830kB, which stronly cuts the download time.
2023-07-04 13:02:33 +02:00
Volker Christian
bfdda20f5b
Fix bug: attr.value() of an array attribute returns an iterator of basic_json objects not an iterator of std::string (#276) 2023-06-19 16:47:34 +02:00
Cristian Le
1242ae1a4a
Revert library name change (#271)
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2023-05-16 13:44:17 +02:00
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
Cristian Le
9360910c3d
Reconfigure CI (#259)
* Add basic presets
* Add basic pre-commit
* Reconfigure github action

- Enforce pre-commits
- Move conan to CD workflow
* Add simple instructions for pre-commit
* Simplify action CIs
* Add coverage CI

Temporarily disabled until setup internally

Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2023-05-10 19:49:27 +02:00
Sven Fink
cae6fad800 Add test for issue 243 2023-01-16 00:01:58 +01:00
Sven Fink
59c9d6200b For root value, use empty pointer 2023-01-16 00:01:58 +01:00
Robert Joslyn
491ac44026 Fix assumed signed char
The code assumes that char is signed, but whether char is signed or
unsigned is implementation defined. On some architectures like PowerPC,
GCC treats char as unsigned resulting in compile errors:

	smtp-address-validator.cpp:213:1: error: narrowing conversion of '-32' from 'int' to 'char' [-Wnarrowing]

Fix this by specifying signed char.
2022-12-01 00:20:33 +01:00
Gareth Sylvester-Bradley
dfcb0152e9 Local include for smtp-address-validator.hpp 2022-11-28 13:09:52 +01:00
Christophe Blaess
f156a7fc7b Remove obsolete sentence in README.md. 2022-11-28 13:08:52 +01:00
Patrick Boettcher
6b17782d6a update to SOVERSION to 2 (as it should have been done 3 years ago)
fix #186
2022-11-26 18:06:09 +01:00
Patrick Boettcher
96a4255938 bump to 2.2.0 (some minor changes/addtions to API) 2022-11-26 17:56:17 +01: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
2a2d2d25d1 CL: Splited regex string to improve readability 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
sebasfalcone
e1e6581b05 CL: encapsulation 2022-10-29 19:03:36 +02:00
sebasfalcone
e39c1aef5b CL:
- Added tests for URI format
- Added URI format validationCL:
2022-10-29 19:03:36 +02:00
Sam V
1063c9adba Make JSON_VALIDATOR_BUILD_EXAMPLES and JSON_VALIDATOR_BUILD_TESTS overridable by user
Resolves pboettch/json-schema-validator#195
2022-09-20 18:24:12 +02:00
Sam V
5b3200f839 Use find_dependency in PackageConfig file
pboettch/json-schema-validator#207
2022-09-10 08:45:39 +02:00
Francesco Biscani
1b27d5cf01 Increase the verbosity of the error message produced when there are undefined references. 2022-09-03 09:24:09 +02:00
Erwin Nindl
0efd3ae507 Build conan package with Github actions 2022-09-03 09:22:23 +02:00
Erwin Nindl
1c126b6f3d Updates conanfile.py 2022-09-03 09:22:23 +02:00
Chris Wright
e1e48ddbe0 Replace dynamic_cast with member functions (#210) 2022-09-02 17:50:07 +02:00
res0nance
5ec1961439 cmake: add option to disable installing targets 2022-09-02 17:47:53 +02:00
res0nance
c7325ae932 ci: update build container to v2.4.0 2022-09-01 20:07:44 +02:00
res0nance
793b85ce12 chore: use to_string() for json_pointers 2022-09-01 20:07:10 +02:00
res0nance
87252bb5ce ci: add CI for the minimum supported version 2022-08-24 18:59:13 +02:00
res0nance
d2210f65da chore: use to_string() to avoid warning 2022-08-24 18:59:13 +02:00
res0nance
0bbb0da522 ci: run on main branch and update nlohmann-json version 2022-08-24 18:59:13 +02:00
Patrick Boettcher
4f67636760 ref-schema: create a new ref-schema when default-value is present
Default-values on schemas with a $ref field are now stored within
a new reference schema which links to the original reference schema.
It contains the default value and keeps a strong reference (shared_ptr)
to the original reference.

Fixes #209
2022-06-27 10:30:11 +02:00