fix https://github.com/Tencent/rapidjson/issues/1778 (part 1)
This commit is contained in:
parent
ce81bc9edf
commit
3a65e2dd7f
@ -475,12 +475,12 @@ public:
|
|||||||
AssignIfExist(allOf_, *schemaDocument, p, value, GetAllOfString(), document);
|
AssignIfExist(allOf_, *schemaDocument, p, value, GetAllOfString(), document);
|
||||||
AssignIfExist(anyOf_, *schemaDocument, p, value, GetAnyOfString(), document);
|
AssignIfExist(anyOf_, *schemaDocument, p, value, GetAnyOfString(), document);
|
||||||
AssignIfExist(oneOf_, *schemaDocument, p, value, GetOneOfString(), document);
|
AssignIfExist(oneOf_, *schemaDocument, p, value, GetOneOfString(), document);
|
||||||
}
|
|
||||||
|
|
||||||
if (const ValueType* v = GetMember(value, GetNotString())) {
|
if (const ValueType* v = GetMember(value, GetNotString())) {
|
||||||
schemaDocument->CreateSchema(¬_, p.Append(GetNotString(), allocator_), *v, document);
|
schemaDocument->CreateSchema(¬_, p.Append(GetNotString(), allocator_), *v, document);
|
||||||
notValidatorIndex_ = validatorCount_;
|
notValidatorIndex_ = validatorCount_;
|
||||||
validatorCount_++;
|
validatorCount_++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Object
|
// Object
|
||||||
@ -915,7 +915,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (additionalPropertiesSchema_) {
|
if (additionalPropertiesSchema_) {
|
||||||
if (additionalPropertiesSchema_ && context.patternPropertiesSchemaCount > 0) {
|
if (context.patternPropertiesSchemaCount > 0) {
|
||||||
context.patternPropertiesSchemas[context.patternPropertiesSchemaCount++] = additionalPropertiesSchema_;
|
context.patternPropertiesSchemas[context.patternPropertiesSchemaCount++] = additionalPropertiesSchema_;
|
||||||
context.valueSchema = typeless_;
|
context.valueSchema = typeless_;
|
||||||
context.valuePatternValidatorType = Context::kPatternValidatorWithAdditionalProperty;
|
context.valuePatternValidatorType = Context::kPatternValidatorWithAdditionalProperty;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user