Merge 'master' branch of 'swagger-codegen' into 'openapi-generator' (#327)

This commit is contained in:
Jérémie Bresson
2018-05-05 16:40:52 +02:00
committed by GitHub
parent c791146b62
commit a2b618a452
16 changed files with 458 additions and 102 deletions

View File

@@ -472,6 +472,9 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
String modifiedName = name.replaceAll("\\.", "");
modifiedName = sanitizeKotlinSpecificNames(modifiedName);
// Camelize name of nested properties
modifiedName = camelize(modifiedName);
if (reservedWords.contains(modifiedName)) {
modifiedName = escapeReservedWord(modifiedName);
}
@@ -479,6 +482,12 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
return titleCase(modifiedName);
}
@Override
public String toModelFilename(String name) {
// Should be the same as the model name
return toModelName(name);
}
/**
* Provides a strongly typed declaration for simple arrays of some type and arrays of arrays of some type.
*