@Override
    public ObjectNode generateSchema() {
        SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(SchemaVersion.DRAFT_2020_12, OptionPreset.PLAIN_JSON)
                .with(Option.DEFINITIONS_FOR_ALL_OBJECTS);
        // ignore all fields declared in super types
        configBuilder.forFields()
                .withIgnoreCheck(field -> !field.getDeclaringType().equals(field.getDeclarationDetails().getSchemaTargetType()));
        // reference super types explicitly
        configBuilder.forTypesInGeneral()
                // including SubtypeResolver would result in a StackOverflowError as the super reference is again replaced with it subtypes
                //.withSubtypeResolver(new SubtypeLookUpExample.ClassGraphSubtypeResolver())
                .withCustomDefinitionProvider(new ParentReferenceDefinitionProvider());
        SchemaGeneratorConfig config = configBuilder.build();
        return new SchemaGenerator(config).generateSchema(TestType.class);
    }
Example created in response to <a href="https://github.com/victools/jsonschema-generator/issues/407">#407</a>.
<br>
Reference separate definitions for common super types. Show-casing capabilities; but not recommended due to risk of infinite loop.
jsonschema-examples/src/main/java/com/github/victools/jsonschema/examples/InheritanceRefExample.java