private <T> ConfigFunction<TypeScope, T> createTypePropertyResolver(
            Function<Schema, T> valueExtractor, Predicate<T> valueFilter) {
        return typeScope -> Optional
                .ofNullable(typeScope.getType().getErasedType().getAnnotation(Schema.class))
                .map(valueExtractor).filter(valueFilter).orElse(null);
    }
Create a {@link ConfigFunction} that extracts a value from the {@link Schema} annotation of a {@link TypeScope}.

@param valueExtractor the getter for the value from the annotation
@param valueFilter filter that determines whether the value from a given annotation matches our criteria
@param <T> the type of the returned value
@return the value from the matching type's {@link Schema} annotation or {@code Optional.empty()}
jsonschema-module-swagger-2/src/main/java/com/github/victools/jsonschema/module/swagger2/Swagger2Module.java