@Override
    public void applyToConfigBuilder(SchemaGeneratorConfigBuilder builder) {
        builder.forFields()
                .withIgnoreCheck(field -> isOptional(field.getDeclaringType()));
        builder.forMethods()
                .withIgnoreCheck(method -> isOptional(method.getDeclaringType()) && !this.includedMethodNames.contains(method.getName()));
    }
Constructor: setting the names of methods declared by the {@link Optional} class to include in its generated object schema.

@param includedMethodNames names of the {@link Optional} class' methods to include

@see SimplifiedOptionalModule#DEFAULT_INCLUDED_METHOD_NAMES
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/module/SimplifiedOptionalModule.java