mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-16 08:31:26 +00:00
fix StringIndexOutOfBoundsException when tag is not provided
This commit is contained in:
@@ -376,7 +376,10 @@ public class DefaultCodegen {
|
||||
}
|
||||
|
||||
public String initialCaps(String name) {
|
||||
return Character.toUpperCase(name.charAt(0)) + name.substring(1);
|
||||
if (name.length()>0)
|
||||
return Character.toUpperCase(name.charAt(0)) + name.substring(1);
|
||||
else
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getTypeDeclaration(String name) {
|
||||
|
||||
Reference in New Issue
Block a user