forked from loafle/openapi-generator-original
add schema mapping support to ruby client generator (#12962)
This commit is contained in:
parent
f898b072ba
commit
2248baa5ea
@ -369,6 +369,12 @@ public class RubyClientCodegen extends AbstractRubyCodegen {
|
||||
|
||||
@Override
|
||||
public String toModelName(final String 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)) {
|
||||
return schemaMapping.get(name);
|
||||
}
|
||||
|
||||
// memoization
|
||||
String origName = name;
|
||||
if (schemaKeyToModelNameCache.containsKey(origName)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user