void (@NotNull JsonValueAdapter value, @NotNull JsonSchemaObject schema, JsonValidationHost consumer, JsonComplianceCheckerOptions options) { final JsonObjectValueAdapter object = value.getAsObject(); if (object == null) return; final List<JsonPropertyAdapter> propertyList = object.getPropertyList(); final Set<String> set = new HashSet<>(); for (JsonPropertyAdapter property : propertyList) { final String name = StringUtil.notNullize(property.getName()); JsonSchemaObject propertyNamesSchema = schema.getPropertyNamesSchema(); if (propertyNamesSchema != null) { JsonValueAdapter nameValueAdapter = property.getNameValueAdapter(); if (nameValueAdapter != null) { JsonValidationHost checker = consumer.checkByMatchResult(nameValueAdapter, consumer.resolve(propertyNamesSchema), options); if (checker != null) { consumer.addErrorsFrom(checker); } } } final JsonPointerPosition step = JsonPointerPosition.createSingleProperty(name); final Pair<ThreeState, JsonSchemaObject> pair = doSingleStep(step, schema, false); if (ThreeState.NO.equals(pair.getFirst()) && !set.contains(name)) { consumer.error(JsonBundle.message("json.schema.annotation.not.allowed.property", name), property.getDelegate(), JsonValidationError.FixableIssueKind.ProhibitedProperty, new JsonValidationError.ProhibitedPropertyIssueData(name), JsonErrorPriority.LOW_PRIORITY); } else if (ThreeState.UNSURE.equals(pair.getFirst())) { for (JsonValueAdapter propertyValue : property.getValues()) { consumer.checkObjectBySchemaRecordErrors(pair.getSecond(), propertyValue); } } set.add(name); } reportMissingOptionalProperties(value, schema, consumer, options); if (object.shouldCheckIntegralRequirements() || options.isForceStrict()) { final Set<String> required = schema.getRequired(); if (required != null) { HashSet<String> requiredNames = new LinkedHashSet<>(required); requiredNames.removeAll(set); if (!requiredNames.isEmpty()) { JsonValidationError.MissingMultiplePropsIssueData data = createMissingPropertiesData(schema, requiredNames, consumer); consumer.error(JsonBundle.message("schema.validation.missing.required.property.or.properties", data.getMessage(false)), value.getDelegate(), JsonValidationError.FixableIssueKind.MissingProperty, data, JsonErrorPriority.MISSING_PROPS); } } if (schema.getMinProperties() != null && propertyList.size() < schema.getMinProperties()) { consumer.error(JsonBundle.message("schema.validation.number.of.props.less.than", schema.getMinProperties()), value.getDelegate(), JsonErrorPriority.LOW_PRIORITY); } if (schema.getMaxProperties() != null && propertyList.size() > schema.getMaxProperties()) { consumer.error(JsonBundle.message("schema.validation.number.of.props.greater.than", schema.getMaxProperties()), value.getDelegate(), JsonErrorPriority.LOW_PRIORITY); } final Map<String, List<String>> dependencies = schema.getPropertyDependencies(); if (dependencies != null) { for (Map.Entry<String, List<String>> entry : dependencies.entrySet()) { if (set.contains(entry.getKey())) { final List<String> list = entry.getValue(); HashSet<String> deps = new HashSet<>(list); deps.removeAll(set); if (!deps.isEmpty()) { JsonValidationError.MissingMultiplePropsIssueData data = createMissingPropertiesData(schema, deps, consumer); consumer.error( JsonBundle.message("schema.validation.violated.dependency", data.getMessage(false), entry.getKey()), value.getDelegate(), JsonValidationError.FixableIssueKind.MissingProperty, data, JsonErrorPriority.MISSING_PROPS); } } } } final Map<String, JsonSchemaObject> schemaDependencies = schema.getSchemaDependencies(); if (schemaDependencies != null) { for (Map.Entry<String, JsonSchemaObject> entry : schemaDependencies.entrySet()) { if (set.contains(entry.getKey())) { consumer.checkObjectBySchemaRecordErrors(entry.getValue(), value); } } } } }