private static boolean isEnum(ResolvedType type) {
        return type.getErasedType() == Enum.class;
    }
Constructor remembering whether to treat enums as plain strings or as objects.

@param enumConstantToString how to derive a plain string representation from an enum constant value, may be null to treat them as objects
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/module/EnumModule.java