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
Milo Yip
992b7f5f8e
Fix nullHandler allocation bug
2016-10-21 12:25:37 +08:00
Milo Yip
bf0cc7bea8
Fixed a bug for SchemaDocument move constructor
2016-10-18 13:53:00 +08:00
Milo Yip
7c4e511eb0
Change Schema::GetTypeless() from singleton to instance
...
Now owned by SchemaDocument::typeless_, and be shared to its
Schema::typeless_
2016-10-18 11:37:15 +08:00
Milo Yip
ddbd2ef05d
Restore missing deallocation of GenericSchemaValidator::nullHandler_
2016-10-18 10:14:00 +08:00
Milo Yip
b963eb447b
Change SchemaValidator::GetNullHandler() from singleton to instance.
2016-10-17 18:30:18 +08:00
Milo Yip
517dd4dbb8
Fix failing to resolve $ref in allOf causes crash in SchemaValidator::StartObject()
2016-10-17 14:25:24 +08:00
Milo Yip
769185d68b
Refactor regex
...
Remove mutable which causes reentrant issue
2016-09-16 12:13:02 +08:00
niukuo
250cf666d3
fix wrong length in remote schema
...
Change-Id: Ia96ddf5746f1c18968e9e086f17fe4a24b8480d7
2016-08-31 16:26:27 +08:00
Jason Smith
899156172d
Make GenericSchemaDocument constructor explicit
...
Prior to this change, a user could incorrectly pass a Document object to
SchemaValidator. This would implicitly construct a SchemaDocument, which
would then be destructed before the validator was used. This caused
unpredictable results including memory corruption and program crashes.
2016-07-01 06:59:07 -07:00
Philipp A. Hartmann
f6a07692f9
Fix warnings on GCC 6 and later ( closes #666 )
...
* document.h
* suppress -Wterminate on GCC 6.x and later
* simplify warning handling
* schema.h
* drop RAPIDJSON_NOEXCEPT from GenericSchemaDocument constructor
(calls RAPIDJSON_NEW anyway)
* simplify warning handling
(avoids RAPIDJSON_POP mismatch on Clang)
* encodingtest.cpp, istreamwrappertest.cpp
* work around -Wdangling-else
* readertest.cpp
* suppress -Wdangling-else
2016-06-23 21:42:16 +02:00
Eli Fidler
8074b722f0
avoid reference to null pointer and member access within null pointer
...
UBSAN gave issues with the typeless Schema:
runtime error: reference binding to null pointer of type 'rapidjson::GenericSchemaDocument<rapidjson::GenericValue<rapidjson::UTF16<wchar_t>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >, rapidjson::CrtAllocator>'
and
runtime error: member access within null pointer of type 'AllocatorType' (aka 'rapidjson::CrtAllocator')
2016-06-13 07:24:26 -07:00
Milo Yip
a6571d504a
Combine objectDependices and objectRequired into propertyExist array
2016-04-19 15:10:28 +08:00
Milo Yip
f586edd33d
Fix required for duplicated keys
...
Fix #608
2016-04-19 15:06:41 +08:00
Milo Yip
ba0a137b9c
Remove unnecessary code in GenericSchemaDocument::CreateSchemaRecursive()
2016-04-17 09:17:05 +08:00
Milo Yip
cb2f340d55
Remove ISchemaStateFactory::ReallocState()
2016-04-17 09:11:00 +08:00
Milo Yip
e7149d6659
Fix memory leak for invalid regex
2016-04-17 00:58:32 +08:00
Milo Yip
26e69ffde9
Fix a bug in schema minimum/maximum keywords for 64-bit integer
2016-04-17 00:48:02 +08:00
Milo Yip
44d114f3ee
Supress VC C4512 warning
2016-04-06 00:47:16 +08:00
Milo Yip
c843a2655b
Try to fix all /W4 warnings in VC2015
2016-04-04 15:01:34 +08:00
Sergey Kosarevsky
22d22145d2
Added GenericSchemaValidator::RawNumber()
2016-02-29 18:05:24 +01:00
Sergey Kosarevsky
2bbfe0d8a8
Number() -> RawNumber() to avoid name clashes with the union Number
2016-02-28 18:50:04 +01:00
Sergey Kosarevsky
334461b421
Added Hasher::Number()
2016-02-28 18:28:19 +01:00
Milo Yip
db4bc75cd9
Add move constructor for GenericSchemaDocument
2016-02-20 22:18:23 +08:00
Milo Yip
8cb978dc15
Add fwd.h and extract stream.h
2016-02-02 18:20:36 +08:00
Milo Yip
dd2076f8d8
Minor refactoring
2016-02-02 12:56:53 +08:00
Milo Yip
ba7aa979a5
Refactoring: Remove GenericSchemaValiadator::nullOutputHandler_
2016-02-02 10:17:06 +08:00
Milo Yip
02ea9f9db6
Refactor: remove unncessary template member functions
2016-02-02 10:00:27 +08:00