@Override
    public void applyToConfigBuilder(SchemaGeneratorConfigBuilder builder) {
        super.applyToConfigBuilder(builder);
        builder.forFields()
                // need to getDeclaredType() to avoid the target-type-override applied by generic wrapper module
                .withNullableCheck(field -> this.hasMemberWrapperType(field) ? Boolean.TRUE : null);
        builder.forMethods()
                // need to getDeclaredType() to avoid the target-type-override applied by generic wrapper module
                .withNullableCheck(method -> this.hasMemberWrapperType(method) ? Boolean.TRUE : null);
    }
Constructor declaring {@link Optional} as the target type to unwrap.
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/module/FlattenedOptionalModule.java