@Override
    public ObjectNode generateSchema() {
        SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(SchemaVersion.DRAFT_7, OptionPreset.PLAIN_JSON);
        configBuilder.with(Option.STRICT_TYPE_INFO, Option.DEFINITIONS_FOR_ALL_OBJECTS);
        configBuilder.forFields()
                .withAdditionalPropertiesResolver(field -> field.getType().getErasedType() == NestedType.class ? Void.class : null);
        SchemaGeneratorConfig config = configBuilder.build();
        SchemaGenerator generator = new SchemaGenerator(config);
        return generator.generateSchema(Example.class);
    }
Example created in response to <a href="https://github.com/victools/jsonschema-generator/discussions/333">#333</a>.
<br/>
Ensuring "type" inclusion on "allOf" parts holding collected attributes, e.g., "additionalProperties".
jsonschema-examples/src/main/java/com/github/victools/jsonschema/examples/StrictTypeInfoExample.java