mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-24 17:29:08 +00:00
Fix inheritance with modelPrefix (#3151)
* Fix inheritance with modelPrefix Fix #3150 * Fix typo
This commit is contained in:
committed by
William Cheng
parent
94c583b6ce
commit
01f991a034
@@ -1756,10 +1756,10 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
m.interfaces.add(modelName);
|
||||
addImport(m, modelName);
|
||||
if (allDefinitions != null && refSchema != null) {
|
||||
if (allParents.contains(modelName) && supportsMultipleInheritance) {
|
||||
if (allParents.contains(ref) && supportsMultipleInheritance) {
|
||||
// multiple inheritance
|
||||
addProperties(allProperties, allRequired, refSchema);
|
||||
} else if (parentName != null && parentName.equals(modelName) && supportsInheritance) {
|
||||
} else if (parentName != null && parentName.equals(ref) && supportsInheritance) {
|
||||
// single inheritance
|
||||
addProperties(allProperties, allRequired, refSchema);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user