add schema mapping to r client (#12933)

This commit is contained in:
William Cheng
2022-07-20 11:09:56 +08:00
committed by GitHub
parent 92193f7159
commit e2b1ed3dfc

View File

@@ -343,6 +343,12 @@ public class RClientCodegen extends DefaultCodegen implements CodegenConfig {
@Override
public String toModelName(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)) {