@Override
    public ObjectNode generateSchema() {
        SchemaGeneratorConfig config = new SchemaGeneratorConfigBuilder(SchemaVersion.DRAFT_2020_12, OptionPreset.PLAIN_JSON)
                .with(new ModuleImpl())
                .build();
        return new SchemaGenerator(config).generateSchema(Example.class);
    }
Example created in response to <a href="https://github.com/victools/jsonschema-generator/issues/248">#248</a>.
<br/>
For use via the Maven plugin where schemas for all types in a given package will be generated and should reference each other.
jsonschema-examples/src/main/java/com/github/victools/jsonschema/examples/ExternalRefPackageExample.java