mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-03-06 13:41:35 +01:00
parent
342a616a7f
commit
df6362d450
@ -783,8 +783,10 @@ public:
|
||||
if (patternProperties_) {
|
||||
context.patternPropertiesSchemaCount = 0;
|
||||
for (SizeType i = 0; i < patternPropertyCount_; i++)
|
||||
if (patternProperties_[i].pattern && IsPatternMatch(patternProperties_[i].pattern, str, len))
|
||||
if (patternProperties_[i].pattern && IsPatternMatch(patternProperties_[i].pattern, str, len)) {
|
||||
context.patternPropertiesSchemas[context.patternPropertiesSchemaCount++] = patternProperties_[i].schema;
|
||||
context.valueSchema = typeless_;
|
||||
}
|
||||
}
|
||||
|
||||
SizeType index;
|
||||
|
@ -1322,6 +1322,13 @@ TEST(SchemaValidator, Issue728_AllOfRef) {
|
||||
VALIDATE(s, "{\"key1\": \"abc\", \"key2\": \"def\"}", true);
|
||||
}
|
||||
|
||||
TEST(SchemaValidator, Issue825) {
|
||||
Document sd;
|
||||
sd.Parse("{\"type\": \"object\", \"additionalProperties\": false, \"patternProperties\": {\"^i\": { \"type\": \"string\" } } }");
|
||||
SchemaDocument s(sd);
|
||||
VALIDATE(s, "{ \"item\": \"hello\" }", true);
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
RAPIDJSON_DIAG_POP
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user