@Override
    public void resetAfterSchemaGenerationFinished() {
        this.mainType = null;
    }
Reference to the targeted type, for which a schema is being generated, that should not be replaced by a "ref".
jsonschema-module-swagger-2/src/main/java/com/github/victools/jsonschema/module/swagger2/ExternalRefCustomDefinitionProvider.java