private @Nullable JsonSchemaVersion getSchemaVersionFromSchemaUrl(@NotNull VirtualFile file) {
    String schemaPropertyValue;
    if (file instanceof  LightVirtualFile || Registry.is("json.schema.object.v2")) {
      JsonSchemaObject schemaRootOrNull = JsonSchemaObjectStorage.getInstance(myProject).getComputedSchemaRootOrNull(file);
      if (schemaRootOrNull != null) {
        schemaPropertyValue = schemaRootOrNull.getSchema();
        return schemaPropertyValue == null ? null : JsonSchemaVersion.byId(schemaPropertyValue);
      }
    }
    Ref<String> res = Ref.create(null);
    //noinspection CodeBlock2Expr
    ApplicationManager.getApplication().runReadAction(() -> {
      res.set(JsonCachedValues.getSchemaUrlFromSchemaProperty(file, myProject));
    });
    schemaPropertyValue = res.get();
    return schemaPropertyValue == null ? null : JsonSchemaVersion.byId(schemaPropertyValue);
  }
private @Nullable JsonSchemaVersion getSchemaVersionFromSchemaUrl(@NotNull VirtualFile file)