159 Commits

Author SHA1 Message Date
Steve Hanson
3df804c128 fix coverage, unit test allocators and equality 2021-06-09 10:31:09 +01:00
Steve Hanson
28bcbd3f35 make std::string optional 2021-06-08 10:53:10 +01:00
Steve Hanson
494447b731 remove copyright & debug statements 2021-05-21 15:55:11 +01:00
Steve Hanson
24b9b7e276 satisfy all compilers 2 2021-03-11 18:16:24 +00:00
Steve Hanson
32722fa31d satisfy all compilers 2021-03-11 16:53:05 +00:00
Steve Hanson
6c9da69abf remove comma 2021-03-11 15:06:02 +00:00
Steve Hanson
6b57738e4a handle internal refs properly 2021-03-11 14:49:28 +00:00
Steve Hanson
ad73c032e7 fix compile errors 2021-02-25 22:51:35 +00:00
Steve Hanson
892f6e3fd3 fix bracket 2021-02-25 22:21:20 +00:00
Steve Hanson
cabc3d5aa1 merge 2021-02-25 22:12:05 +00:00
Steve Hanson
7698b3cd48 code and tests 2021-02-25 21:45:29 +00:00
Milo Yip
b1a4d91a53
Merge pull request #1779 from pavel-pimenov/fix-1778-part-1
fix 1778  (part 1)
2021-02-23 10:23:34 +08:00
Steve Hanson
9bb81e20ff fix crash where simple type with sub-schema has a bad value 2021-02-12 17:36:55 +00:00
Steve Hanson
a3757456fe correct workaround for issue 1805 2021-01-29 16:43:12 +00:00
Steve Hanson
c491dd5213 remove C++ 11 enum syntax 2021-01-29 10:26:05 +00:00
Steve Hanson
6f3cccd6e1 remove debug std::cout, handle empty error object in example 2021-01-28 14:21:36 +00:00
Steve Hanson
05e7b33977 code and tests 2021-01-28 12:11:43 +00:00
Pave Pimenov
3a65e2dd7f fix https://github.com/Tencent/rapidjson/issues/1778 (part 1) 2020-09-12 19:53:06 +03:00
Joshua Watt
134af9d811 Remove shadow typedef
Removes a duplicate and identical typedef that was causing a
'declaration shadows typedef' (-Wshadow) warning in clang.
2019-12-02 09:19:16 -06:00
Renny Koshy
c43697c16c - Fixed a build issue by initializing "index" in the header file 2019-06-21 23:55:32 -04:00
ylavic
94fc463801 Add missing curly brackets in STDREGEX's CreatePattern(). 2019-04-29 15:06:52 +02:00
ylavic
dbb594bdb3 Use the allocator of the Schema for its Pointer.
The Pointer passed to construct the Schema can be from the stack or any
transient storage, so the copy stored in the Schema must have the same
lifetime/allocator as the Schema itself.
2019-01-10 18:42:16 +01:00
ylavic
3e6956767e Fix a memory leak for invalid std::regex in Schema. 2018-12-01 23:36:45 +01:00
Philipp A Hartmann
a26267d16d Fix -Wsign-conversion warnings/errors
GCC 8 (incorrectly) warns about sign conversions in (constant)
array size expressions:

error: conversion to 'long unsigned int' from 'int' may
change the sign of the result [-Werror=sign-conversion]
     char schemaBuffer_[128 * 1024];

Make these expressions unsigned by adding a 'u' suffix to
the first operands.
2018-07-15 16:01:02 +02:00
bogaotory
6f7dcb30d9 again, in relation to solving issue #784, use SizeType-typed variable to indicate a none-zero length string has been given in the schema as default value for the json property; added an unittest Object_Required_PassWithDefault 2018-06-01 21:16:26 +01:00
bogaotory
fa98b5b4b6 in relation to solving issue #784, this commit enables the schema to recognise the "default" property, and avoids a missing property error when a default is given in the schema 2018-06-01 11:07:53 +01:00
Zoltan Kovago
0fdd8040ce fix compilation on windows with clang 2018-04-09 15:47:17 +02:00
Christian Semmler
8a6c345bcc add remote ref to schemaMap_ 2018-03-23 23:33:20 +01:00
sergey kachanovskiy
2e5dcceda0 Fixes #1198 2018-03-12 16:11:09 +01:00
Milo Yip
b1e556d713
Merge branch 'master' into violationDetails 2018-01-13 22:34:58 +08:00
Milo Yip
03f5de9d7e
Merge pull request #1065 from yurikhan/invalidSchemaPointer
Fix reported violated schema pointer when that schema is remote
2018-01-13 21:17:56 +08:00
xiaoPierre
b8c12c9ccd Bug when switching to std regex
I could not switch to std regex after defining the two variables as in documents. Then I try to fix it in schema.h.
2018-01-11 17:45:35 +01:00
Milo Yip
bf822593ee Merge pull request #1083 from piotr-kaminski-intel/master
Removing Klocwork issues from schema.h
2017-10-20 17:47:13 +08:00
piotr-kaminski-intel
bb99ccb030 Init variable in the constructor
line 358:
'this->notValidatorIndex_' might not be initialized in this constructor.
2017-10-10 14:09:23 +02:00
piotr-kaminski-intel
b217cc640c Removing Klocwork issues from schema.h
Removing Klocwork static code analysis critical issues:

line 358:
'this->notValidatorIndex_' might not be initialized in this constructor.
line :412
Pointer 'schemaDocument' checked for NULL at line 412 may be passed to function and may be dereferenced there by passing argument this to function 'CreateSchema' at line 419. Also there are 7 similar errors on lines 467 479 511 523 533 538 549.
2017-10-07 00:50:55 +02:00
Étienne Dupuis
6e08e29425 Initialized regex with schema allocator. 2017-10-05 11:39:21 +02:00
Yuri Khan
8c182e51e7 Flatten allOf keyword violations 2017-09-30 20:16:03 +07:00
Yuri Khan
1f75402704 refactor Schema: Keep ErrorHandler reference in Context 2017-09-30 19:05:25 +07:00
Yuri Khan
f716c3bfb5 Report schema violation details (#619) 2017-09-24 12:56:55 +07:00
Yuri Khan
c2371584a0 Keep schema URI in GenericSchemaDocument and internal::Schema 2017-09-23 21:36:07 +07:00
Yuri Khan
2bfd0cc6c7 internal::Schema: Keep pointer for future use 2017-09-23 20:42:39 +07:00
Milo Yip
fcd2e1f60c Fix #1017 allOf keyword fail with Writer handler
Gave up using static binding for null handler, because it cannot be
used with arbitrary handler type. Change `OutputHandler handler_` to
pointer type.
2017-07-13 16:07:36 +08:00
Milo Yip
df6362d450 Fix patternProperties & additionalProperties lead to ASSERT
Fix #825
2017-06-09 10:16:24 +08:00
Oliver Hahm
885b5cd2f9 common notation of empty if/else case 2017-04-21 14:49:30 +02:00
Oliver Hahm
63423eb6f8 fix return values 2017-04-21 14:49:12 +02:00
StilesCrisis
4643104b8a Fix null handler construction
We should not malloc the null-handler object and cast to OutputHandler;
we need to actually invoke the constructor via placement new.
2017-02-27 23:28:25 -08:00
Milo Yip
97e2f7f16f Try fixing Error compilation Ubuntu 14.04 #834 2017-02-28 09:48:36 +08:00
Zhihao Yuan
3cc77d5d63
Treat signed-unsigned conversions as errors. 2017-01-18 18:09:18 -06:00
Andrey Glebov
41ceb8624f - replaced RAPIDJSON_NEW with C++98 compatible version 2016-12-21 14:03:53 +03:00
Andrey Glebov
9fe93bb984 - replaced RAPIDJSON_NEW macro with variadic varient 2016-12-21 10:17:25 +03:00