Skip to content

Commit

Permalink
Improve dto code generation
Browse files Browse the repository at this point in the history
  • Loading branch information
ermadmi78 committed Jul 29, 2021
1 parent f79ba86 commit 01e5875
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,8 @@ internal fun generateDto(schema: KobbySchema, layout: KotlinLayout): List<FileSp
}
superclass(ClassName("kotlin", "RuntimeException"))
addSuperclassConstructorParameter(
"message + (errors?.joinToString(\",\\n \", \"\\n \", \"\\n\")·{ it.toString() } ?: \"\")"
"message + (errors?.%M(\",\\n \", \"\\n \", \"\\n\")·{ it.toString() } ?: \"\")",
MemberName("kotlin.collections", "joinToString")
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import kotlin.RuntimeException
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.joinToString

public class CinemaException(
message: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import kotlin.RuntimeException
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.joinToString

public class GraphqlException(
message: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import kotlin.RuntimeException
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.joinToString

public class SimpleException(
message: String,
Expand Down

0 comments on commit 01e5875

Please sign in to comment.