in rapidjson/schema.h [828:856]
bool EndObject(Context& context, SizeType memberCount) const {
if (hasRequired_)
for (SizeType index = 0; index < propertyCount_; index++)
if (properties_[index].required)
if (!context.propertyExist[index])
RAPIDJSON_INVALID_KEYWORD_RETURN(GetRequiredString());
if (memberCount < minProperties_)
RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinPropertiesString());
if (memberCount > maxProperties_)
RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaxPropertiesString());
if (hasDependencies_) {
for (SizeType sourceIndex = 0; sourceIndex < propertyCount_; sourceIndex++)
if (context.propertyExist[sourceIndex]) {
if (properties_[sourceIndex].dependencies) {
for (SizeType targetIndex = 0; targetIndex < propertyCount_; targetIndex++)
if (properties_[sourceIndex].dependencies[targetIndex] && !context.propertyExist[targetIndex])
RAPIDJSON_INVALID_KEYWORD_RETURN(GetDependenciesString());
}
else if (properties_[sourceIndex].dependenciesSchema)
if (!context.validators[properties_[sourceIndex].dependenciesValidatorIndex]->IsValid())
RAPIDJSON_INVALID_KEYWORD_RETURN(GetDependenciesString());
}
}
return true;
}