forked from loafle/openapi-generator-original
fix operation id starting with number for python client (#682)
This commit is contained in:
parent
b587052de4
commit
036fa6918c
@ -552,6 +552,12 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
operationId = "call_" + operationId;
|
operationId = "call_" + operationId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// model name starts with a number
|
||||||
|
if (operationId.matches("^\\d.*")) {
|
||||||
|
LOGGER.warn(operationId + " (starting with a number) cannot be used as method name. Renamed to " + underscore(sanitizeName("call_" + operationId)));
|
||||||
|
operationId = "call_" + operationId;
|
||||||
|
}
|
||||||
|
|
||||||
return underscore(sanitizeName(operationId));
|
return underscore(sanitizeName(operationId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
3.1.1-SNAPSHOT
|
3.2.0-SNAPSHOT
|
Loading…
x
Reference in New Issue
Block a user