[Python] fix api file name & api var name - #11051
Conversation
331fcc1 to
d3c4c54
Compare
|
org.openapitools.codegen.languages.AbstractPythonCodegen#toApiFilename this method has some problem
i want modify it to : but it is incompatible with some situation, |
|
call for review @taxpon @frol @mbohlool @cbornet @kenjones-cisco @tomplus @Jyhess @spacether |
|
same to toApiFilename, toApiVarName method also need modify |
377a31a to
8167527
Compare
| @Override | ||
| public String toApiVarName(String name) { | ||
| if (name.length() == 0) { | ||
| return "default_api"; |
There was a problem hiding this comment.
What happens when name length is 0 with your update?
There was a problem hiding this comment.
after update, it will call method: toApiName(name)
public String toApiName(String name) {
if (name.length() == 0) {
return "DefaultApi";
}
return camelize(apiNamePrefix + "_" + name + "_" + apiNameSuffix);
}this method will get default name where name length is 0
|
This PR changes the api file names, making it a breaking change. |
@spacether i can wait for 6.0.0 branch |
|
UPDATE: I've changed the target branch to 6.0.x |
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.For Windows users, please run the script in Git BASH.
master(5.3.0),6.0.x