Skip to content

Commit

Permalink
allow PHP generator to accept modelNameMapping (#20533)
Browse files Browse the repository at this point in the history
  • Loading branch information
Abraham-Flutterwave authored Jan 24, 2025
1 parent a68ad56 commit 95a74c8
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 95a74c8

Please sign in to comment.