forked from loafle/openapi-generator-original
fix: remove "hack" to skip schema-mapped models (#19191)
That method relied on the faulty assumption that toModelFilename does not consider mappings, which is not the case for multiple generators.
This commit is contained in:
parent
aa7c62abb7
commit
2c2d6905cb
@ -469,14 +469,7 @@ public class DefaultGenerator implements Generator {
|
||||
try {
|
||||
//don't generate models that have an import mapping
|
||||
if (config.schemaMapping().containsKey(name)) {
|
||||
LOGGER.debug("Model {} not imported due to import mapping", name);
|
||||
|
||||
for (String templateName : config.modelTemplateFiles().keySet()) {
|
||||
// HACK: Because this returns early, could lead to some invalid model reporting.
|
||||
String filename = config.modelFilename(templateName, name);
|
||||
Path path = java.nio.file.Paths.get(filename);
|
||||
this.templateProcessor.skip(path, "Skipped prior to model processing due to schema mapping.");
|
||||
}
|
||||
LOGGER.info("Model {} not generated due to schema mapping", name);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user