diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java index 43cc08e3dfce..d0d2d94bcc23 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java @@ -501,6 +501,11 @@ private String toGenericName(String name) { @Override public String toModelName(String name) { + + if (modelNameMapping.containsKey(name)) { + return modelNameMapping.get(name); + } + // memoization String origName = name; if (schemaKeyToModelNameCache.containsKey(origName)) {