Commit Graph

174 Commits

Author SHA1 Message Date
Tristan Penman
d0f67e4afc Remove old header inclusion guards 2019-08-22 22:19:09 +10:00
Tristan Penman
162f246e63 Add placeholders for conditional constraint 2019-08-22 22:12:40 +10:00
Tristan Penman
c19a02bff0
Merge pull request #69 from drdavella/use-maybe
Fix places in adapter implementation where non-strict checks should be used
2019-08-20 10:44:22 +10:00
Daniel D'Avella
25c5a5df51 Fix instances in basic_adapter that should use maybe 2018-09-06 09:13:12 -04:00
Daniel D'Avella
d23f4047ed Fix instances in schema_parser.hpp that should use maybe* 2018-09-06 09:13:12 -04:00
Daniel D'Avella
67efb56b2c Allow findAbsoluteDocumentUri to be overridden by subclasses of SchemaParser 2018-08-28 13:41:22 -04:00
Tristan Penman
c2f22fddf5 Minor change to internal/optional.hp so that __has_include is used only if __cplusplus >= 201703 2018-08-02 12:07:51 +10:00
Tristan Penman
d91991c2d1 Whitespace corrections for schema_parser.hpp 2018-08-01 14:43:40 +10:00
Tristan Penman
69b2bec157 Produce a more useful error message when attempting to parse a schema from a JSON value that is not an object 2018-08-01 14:39:43 +10:00
Tristan Penman
d9c4f22f30 Address std::allocator deprecation warning in custom_allocator.hpp 2018-03-08 11:10:39 +11:00
Andrij Abyzov
c9fe25907f
Fix compilation warning on 32-bit systems.
On 32-bit systems size_t is a 32-bit type which causes the following warning:
warning: large integer implicitly truncated to unsigned type [-Woverflow]

There's no reason have size_t storage variable for uint64_t accessors.
2018-03-07 16:23:38 +01:00
Tristan Penman
4be2a79a37 Merge pull request #51 from falstaff84/fix-oneof-anyof
Make sure that errors from failed 'oneOf' or 'anyOf' constraint check…
2017-09-24 09:03:12 +10:00
Charles Francoise
3b67951a74 fix compilation for clang libc++ 3.8.0 2017-09-22 17:47:13 +02:00
Stefan Agner
cf50f63665 Make sure that errors from failed 'oneOf' or 'anyOf' constraint checks do not appear in error list 2017-08-04 21:03:26 -07:00
Tristan Penman
64abe842b8 Only call fetchDoc if actual document URI is equal to current scope as set using 'id' attribute 2017-07-10 12:51:20 +10:00
Valeriy Bykov
26e16f9cad Compile with gcc-7.1.0 2017-06-14 19:55:33 +03:00
Valeriy Bykov
20ea506b31 Include <optional> from dedicated file optional.hpp 2017-06-14 19:54:22 +03:00
Tristan Penman
c08413d010 Fix exception type and error message in poco_json_utils.hpp 2017-05-31 15:05:42 +10:00
drewxa
e943e3ef94 add poco json adapter
* new adapter
* util
* tests
2017-05-24 15:36:50 +03:00
plamot
2c0477c30a qtjson utils and tests update 2017-03-27 01:20:24 +02:00
plamot
51c916c029 Provide proper implementation of isInteger for qtjson 2017-03-22 00:38:26 +01:00
Pierre Lamot
b8b2634ad6 add support for Qt Json parser
http://doc.qt.io/qt-5/json.html
2017-03-06 16:38:02 +01:00
JustCameToHelp
e3ac11e52b Corrected reporting of array indices violating uniqueItems constraint. 2017-01-29 13:40:13 +01:00
Tristan Penman
22bf9f2278 Add explicit qualifier to single-argument FrozenValue constructors 2016-11-07 23:01:13 -08:00
Tristan Penman
032a8bdcf2 Remove unused variable from nlohmann_json_utils.hpp 2016-11-07 23:00:25 -08:00
Tristan Penman
187c66d06c Add missing return statement to CustomAllocator::operator= 2016-11-07 22:58:58 -08:00
Tristan Penman
c5f2852029 Merge pull request #34 from iterion/topic/add-iterator-accessor
Add iterator accessors to ValidationResult class
2016-11-07 21:21:07 -08:00
Adam Sunderland
bc8120f531 Add iterator accessor
Move iterators to results class
2016-11-07 17:13:03 -06:00
Tristan Penman
c04b82c47a Remove unnecessary destructor from ValidationResults class 2016-11-04 09:04:36 -07:00
Adam Sunderland
b4940a6e91 Add #include cstring 2016-10-31 12:21:56 -05:00
Martin Robinson
2e9d147c99 Added an empty virtual destructor to the ConstraintVisitor class. 2016-09-13 10:23:07 +01:00
Nicolas Witczak
8adbe3e959 Using std::function instead of function pointer in type FunctionPtrs 2016-09-12 10:19:07 +02:00
Tristan Penman
fe7e19494c Fix decrement operator in PropertyTreeObjectMemberIterator 2016-08-15 22:32:47 -07:00
Tristan Penman
29721d5538 Minor tweaks for consistency with coding style 2016-08-15 22:32:47 -07:00
Tristan Penman
3d3f76df10 Add missing #includes and remove usage of json_parser_error type for boost property_trees 2016-08-15 22:32:47 -07:00
Lars Immisch
b6854612a4 This patch drops boost as a dependency from the valijson core.
It is based on https://github.com/tristanpenman/valijson/pull/28, but squashed and rebased for simplicity.

See the original https://github.com/tristanpenman/valijson/pull/28 for history.
2016-08-15 22:32:47 -07:00
Tristan Penman
521a1033fa Add space between two > characters for compiler friendliness 2016-04-08 08:40:56 +10:00
Tristan Penman
836f17c827 Use more appropriate itr dereference operator in SchemaParser destructor 2016-04-08 08:29:04 +10:00
Tristan Penman
40f0f4868c Make custom constraint loop C++03 friendly 2016-04-08 08:26:57 +10:00
Tristan Penman
078ee62301 Move ConstraintBuilder to its own header file and update SchemaParser to explicitly take ownership of a ConstraintBuilder by pointer 2016-04-08 08:24:05 +10:00
Tristan Penman
9ad441dfbe Remove potentially risky overloads of addConstraint function and make existing impl more exception safe 2016-04-08 08:22:32 +10:00
James Jensen
94cd71fe09 Allow subclassing ValidationResults.
I use this because our Path constraint needs information global to the current validator(the root of the document).
The natural place for this would be in a subclass of Validator, but by the time we are in the validation visitor we don't have access to that.
I prefer not to use a global because that would introduce threading issues.  That leaves putting the state in the results.
2016-04-07 11:49:57 -04:00
James Jensen
acffebd74e Add ConstraintBuilder, allowing the user to add constraints to the json schema language 2016-04-07 11:40:11 -04:00
James Jensen
f3eb9edb7b fix some more -wall warnings. 2016-04-07 11:40:10 -04:00
James Jensen
ade9662e1f make cloneInto private, because calling it with the wrong size allocation would be bad. 2016-04-07 11:36:39 -04:00
Tristan Penman
e66413e97f Alphabetise class names 2016-04-07 09:56:57 +10:00
Tristan Penman
32e89abcda Remove potentially risky overloads of addConstraintToSubschema function 2016-04-07 09:56:24 +10:00
Tristan Penman
99e870ca5d Flesh out API for PolyConstraint concept, simplify test cases and add new files to Xcode project 2016-04-07 09:55:13 +10:00
James Jensen
8f446704f7 Add polymorphic constraint, and modifications neccessary for using them
Modify CMakeLists.txt to make third party include files be included by -isystem.  This reduces external warnings/errors.

Add a unit test for the PolyConstraints.  The test doesn't pass, because the right method for inserting a constraint isn't clear to me.

Add Authors file for tracking modifications

Add Akamai to the License file.
2016-04-06 16:20:39 -04:00
Tristan Penman
e2a011edc0 Fix errors introduced during rebase 2016-03-20 14:10:07 +11:00