public SchemaGeneratorConfig build() {
        // apply the configurations associated with enabled/disabled options
        EnumSet<Option> allOptions = EnumSet.allOf(Option.class);
        Set<Option> enabledOptions = EnumSet.allOf(Option.class).stream()
                .filter(option -> this.options.getOrDefault(option, this.preset.isOptionEnabledByDefault(option)))
                .collect(Collectors.toSet());
        Map<Option, Boolean> validOptions = allOptions.stream()
                .filter((configuredOption) -> enabledOptions.stream().noneMatch(enabledOne -> enabledOne.isOverriding(configuredOption)))
                .collect(Collectors.toMap(option -> option, enabledOptions::contains, (first, second) -> first, LinkedHashMap::new));

        validOptions.entrySet().stream()
                .map(setting -> setting.getKey().getModule(setting.getValue()))
                .filter(Objects::nonNull)
                .forEach(this::with);
        // discard invalid enabled options
        enabledOptions.retainAll(validOptions.keySet());
        // construct the actual configuration instance
        return new SchemaGeneratorConfigImpl(this.objectMapper,
                this.schemaVersion,
                enabledOptions,
                this.typesInGeneralConfigPart,
                this.fieldConfigPart,
                this.methodConfigPart,
                this.annotationInclusionOverrides);
    }
Create a schema generator instance from the builder.

@return successfully created/initialised generator instance
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorConfigBuilder.java