Commit Graph

204 Commits

Author SHA1 Message Date
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
Martin KOCH
c6cb3d4c2d mention default value processing in the README 2022-06-06 10:09:55 +02:00
Martin KOCH
5e5918d2ae distinguish between schema_ref and type_schema 2022-06-06 10:09:51 +02:00
Patrick Boettcher
6cb497822b deeper test $refs with default-values 2022-06-06 10:08:43 +02:00
Patrick Boettcher
61d8b6deb4 make default-values work for stacked $refs 2022-06-06 10:08:43 +02:00
Patrick Boettcher
c2656586f9 more complex default-value-tests - fails 2022-06-06 10:08:43 +02:00
Martin KOCH
686f3b1cc5 Support override of default value when using referenced schemas (#189) 2022-06-06 10:08:43 +02:00
Matthias Deimbacher
0d563960cd Fix explicit conversion to string 2022-06-06 08:59:43 +02:00
Leon De Andrade
8e4751f6f7 Add dll export macro to format check 2022-01-01 18:30:55 +01:00
vrince
b1ef862832
prepend all cmake option with JSON_VALIDATOR_ (#179)
Co-authored-by: Thomas Vincent <tvincent@ei3.com>
2021-11-19 08:55:17 +01:00
Luke
d8467b7c08
Updated exclusive min/max error message #182 (#183)
The error messages for exclusive minimum and maximum have been updated
to include 'or equals' for greater clarity.

Fix #182
2021-11-18 18:32:40 +01:00
Finkman
639e09b6f9
First approach to clean out (#165)
* First approach to clean out

* Update readme remove example

* Correct readme for install and json integration
2021-11-11 20:23:50 +01:00
qvfh83
cc05de9327
Create basic github-actions workflow (#175)
Added basic workflow.
2021-10-10 18:37:03 +02:00
qvfh83
0097de3c54
Use explicit type conversion from json (#173)
* Use explicit type conversion

As detailed in https://github.com/nlohmann/json#implicit-conversions, it's recommended not to use implicit conversions from json. This change allows those using "JSON_ImplicitConversions" OFF to still build this package.

* Use matching type from declaration for some variables.
2021-10-10 18:03:09 +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
89ed13d76b First implementation of sub-schema-validation on request.
#149 and #135
2021-06-17 09:06:23 +02:00
Patrick Boettcher
b4733c50c1 update to latest JSON-schema-tests, with some fixes 2021-06-10 11:02:41 +02:00
eike-fokken
e1cef0b58b
fixed occurences of old-style casts and an implicit cast to double (#151)
* fixed occurences of old-style casts and an implicit cast to double

Co-authored-by: Eike <e.fokken+git@posteo.de>
2021-03-16 00:11:10 +01:00
Spuriosity1i
a07f9169af Altered code for bash 3.2 compatibility, default bash on macOS 2021-03-09 13:46:01 +01:00
Patrick Boettcher
ecaeea06bc Add an example for how to use with cmake-submodules
fix #147
fix #148
2021-03-09 11:22:30 +01:00
Patrick Boettcher
3893a2c3af fix #143: the whole unknown keywords-hierarchy needs to be an object
Even if the key is a number in a string. See issue for more details.
2021-03-09 10:39:19 +01:00
Felix Benning
83fd6a8a1f remove-semicolon 2021-03-08 08:14:51 +01:00
Patrick Boettcher
a4bc67d754 force schema-instance-type of unknown-keywords to an object
fixes #143
2021-02-08 17:57:21 +01:00
Michael Jabbour
73d57d9540
Fix explicit tuple constructor error on gcc-5 (#138) 2020-12-03 11:49:52 +01:00
Michael Jabbour
5302adfdc7
Remove unnecessary call to std::tie (fixes compilation error on MSVC 2017) (#137)
* replace std::tie with simple tuple

The call to std::tie was causing a compiler error on MSVC 2017.
2020-11-26 10:30:14 +01:00
Mark Marshall
1519c845c2 Don't shadow "schema" with local variables of the same name
This fixes a warning from gcc (-Wshadow).
2020-09-03 10:41:40 +02:00
Mark Marshall
b10710d960 Switch on -Wshadow 2020-09-03 10:41:35 +02:00
TheMarpe
1ad9a10b0b
Fixed Hunter integration and added tests (#126) 2020-08-14 09:33:03 +02:00
Patrick Boettcher
82f962d1e8 update README concerning format-checker-usage 2020-08-05 10:11:14 +02:00
Patrick Boettcher
cb5b83ebcd add simple format-callback-example
Addresses #129
2020-08-05 09:31:34 +02:00
Finkman
d3b0d327cd
re-worked install configs (#128) 2020-07-26 17:16:14 +02:00
Patrick Boettcher
ea711586b1 thread-safety section in README added. 2020-07-13 11:47:44 +02:00
Martin Peterlin
6e9812f4e3 Added Hunter, install and MSVC fix 2020-07-13 11:35:36 +02:00
Patrick Boettcher
43acedcf7e fix travis, now needs 3.8.0-json 2020-07-13 11:25:54 +02:00
Patrick Boettcher
8a30b6b483 binary-type was added to nlohmann::json 3.8.0 - this is the minimum requirement now 2020-07-13 11:18:20 +02:00
Patrick Boettcher
5782bdcf9e use auto for char-type 2020-07-13 11:17:18 +02:00
andrejlevkovitch
b9d8e098cd add checks about content checker at shema parsing stage 2020-07-13 11:13:08 +02:00
andrejlevkovitch
dbf59ab4c3 move checks contentEncoding and contentMediaType to string schema 2020-07-13 11:13:08 +02:00
andrejlevkovitch
a632d2707b add support for validate binary data in nlohmann::json
Used for bson or other implementations of binary json-instances.
2020-07-13 11:13:08 +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
Guillaume G
32af07ce19
fix default is empty object (#123)
* fix default is empty object

* add counter check with no default or null
2020-06-29 15:20:07 +02:00
Jakob Lykke Andersen
ef05be7efa Disable tests and examples when used via add_subdirectory. 2020-06-12 17:24:41 +02:00