add schema mapping to powershell generator (#12934)

This commit is contained in:
William Cheng
2022-07-20 11:10:27 +08:00
committed by GitHub
parent e2b1ed3dfc
commit 322f617d33

View File

@@ -909,6 +909,12 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo
*/
@Override
public String toModelName(String name) {
// check if schema-mapping has a different model for this class, so we can use it
// instead of the auto-generated one.
if (schemaMapping.containsKey(name)) {
return schemaMapping.get(name);
}
// memoization
String origName = name;
if (schemaKeyToModelNameCache.containsKey(origName)) {