Skip to content

Commit d015254

Browse files
authored
Merge pull request #704 from swagger-api/codegen-issue-10307
handle parent type mapping
2 parents 5632f50 + 16e0719 commit d015254

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/io/swagger/codegen/v3/generators/DefaultCodegenConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,7 @@ else if (schema instanceof ComposedSchema) {
14311431

14321432
if (parent != null) {
14331433
codegenModel.parentSchema = parentName;
1434-
codegenModel.parent = toModelName(parentName);
1434+
codegenModel.parent = typeMapping.containsKey(parentName) ? typeMapping.get(parentName): toModelName(parentName);
14351435
addImport(codegenModel, codegenModel.parent);
14361436
if (allDefinitions != null) {
14371437
if (supportsInheritance) {

0 commit comments

Comments
 (0)