forked from loafle/openapi-generator-original
add schema mapping support to perl (#12991)
This commit is contained in:
parent
219b32b543
commit
00ef7a8590
@ -334,6 +334,12 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toModelName(String name) {
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
name = sanitizeName(name); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'.
|
name = sanitizeName(name); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'.
|
||||||
|
|
||||||
// model name cannot use reserved keyword
|
// model name cannot use reserved keyword
|
||||||
|
Loading…
x
Reference in New Issue
Block a user