Skip to content

Commit

Permalink
fix(java): Use modelNameMappings if provided (#18025)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiphoseer committed Mar 6, 2024
1 parent ae9084b commit 8eaeb2a
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,11 @@ public String toParamName(String name) {

@Override
public String toModelName(final String name) {
// obtain the name from modelNameMapping directly if provided
if (modelNameMapping.containsKey(name)) {
return modelNameMapping.get(name);
}

// We need to check if schema-mapping has a different model for this class, so we use it
// instead of the auto-generated one.
if (schemaMapping.containsKey(name)) {
Expand Down

0 comments on commit 8eaeb2a

Please sign in to comment.