Suffix entity class names with "Entity"
This commit is contained in:
parent
4f40b57d34
commit
4d8a5ed603
1 changed files with 3 additions and 2 deletions
|
@ -29,7 +29,8 @@ class EntitiesGenerator(
|
|||
|
||||
private fun generateEntityStubs(entities: List<JsonAny>) {
|
||||
for (entity in entities) {
|
||||
val name = CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, entity.get("name").toString())!!
|
||||
val name =
|
||||
CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, entity.get("name").toString())!! + "Entity"
|
||||
|
||||
val filePathRelativeToSourceRoot = "./${BLOCK_PACKAGE.replace(".", "/")}/$name.kt"
|
||||
if (sourcesDir.resolve(filePathRelativeToSourceRoot).exists()) continue
|
||||
|
@ -63,7 +64,7 @@ class EntitiesGenerator(
|
|||
private fun generateEntitiesList(entities: List<JsonAny>) {
|
||||
val names = entities
|
||||
.map { it.get("name").toString() }
|
||||
.map { CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, it) }
|
||||
.map { CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, it) + "Entity" }
|
||||
|
||||
val property = PropertySpec.builder(
|
||||
"GENERATED_ENTITIES",
|
||||
|
|
Reference in a new issue