private static boolean checkObject(@NotNull JsonValueAdapter value,
                                     @NotNull JsonSchemaObject schema,
                                     JsonValidationHost consumer,
                                     JsonComplianceCheckerOptions options) {
    final JsonObjectValueAdapter object = value.getAsObject();
    if (object == null) return true;

    var isValid = true;

    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,
                                                                                                      nameValueAdapter), options);
          if (checker != null) {
            consumer.addErrorsFrom(checker);
            isValid = false;
            if (options.shouldStopValidationAfterAnyErrorFound()) return false;
          }
        }
      }

      final JsonPointerPosition step = JsonPointerPosition.createSingleProperty(name);
      final Pair<ThreeState, JsonSchemaObject> pair = doSingleStep(step, schema);
      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);
        isValid = false;
        if (options.shouldStopValidationAfterAnyErrorFound()) return false;
      }
      else if (ThreeState.UNSURE.equals(pair.getFirst()) && pair.second.getConstantSchema() == null) {
        for (JsonValueAdapter propertyValue : property.getValues()) {
          consumer.checkObjectBySchemaRecordErrors(pair.getSecond(), propertyValue);
          isValid &= consumer.getErrors().isEmpty();
          if (!isValid && options.shouldStopValidationAfterAnyErrorFound()) return false;
        }
      }
      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, value);
          consumer.error(JsonBundle.message("schema.validation.missing.required.property.or.properties", data.getMessage(false)),
                         value.getDelegate(), JsonValidationError.FixableIssueKind.MissingProperty, data,
                         JsonErrorPriority.MISSING_PROPS);
          isValid = false;
          if (options.shouldStopValidationAfterAnyErrorFound()) return false;
        }
      }
      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);
        isValid = false;
        if (options.shouldStopValidationAfterAnyErrorFound()) return false;
      }
      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);
        isValid = false;
        if (options.shouldStopValidationAfterAnyErrorFound()) return false;
      }
      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, value);
              consumer.error(
                JsonBundle.message("schema.validation.violated.dependency", data.getMessage(false), entry.getKey()),
                value.getDelegate(),
                JsonValidationError.FixableIssueKind.MissingProperty,
                data, JsonErrorPriority.MISSING_PROPS);
              isValid = false;
              if (options.shouldStopValidationAfterAnyErrorFound()) return false;
            }
          }
        }
      }
      for (String name : StreamEx.of(schema.getSchemaDependencyNames())) {
        var dependency = schema.getSchemaDependencyByName(name);
        if (set.contains(name) && dependency != null) {
          consumer.checkObjectBySchemaRecordErrors(dependency, value);
          isValid &= consumer.getErrors().isEmpty();
          if (!isValid && options.shouldStopValidationAfterAnyErrorFound()) return false;
        }
      }
    }
    return checkUnevaluatedPropertiesSchemaViolation(consumer, schema, object, options);
  }
private static boolean checkObject(@NotNull JsonValueAdapter value,
                                     @NotNull JsonSchemaObject schema,
                                     JsonValidationHost consumer,
                                     JsonComplianceCheckerOptions options)