Skip to content

Commit c22863e

Browse files
authored
fix: update vertx-web-kotlinx to adhere to the json test requirement (#9813)
Which is "For each request, an object mapping the key message to Hello, World! must be instantiated."
1 parent 58c102e commit c22863e

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

frameworks/Kotlin/vertx-web-kotlinx/src/main/kotlin/MainVerticle.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class MainVerticle(val hasDb: Boolean) : CoroutineVerticle(), CoroutineRouterSup
153153

154154
fun Router.routes() {
155155
get("/json").jsonResponseCoHandler(Serializers.message) {
156-
jsonSerializationMessage
156+
Message("Hello, World!")
157157
}
158158

159159
get("/db").jsonResponseCoHandler(Serializers.world) {

frameworks/Kotlin/vertx-web-kotlinx/src/main/kotlin/Models.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import kotlin.random.Random
44
@Serializable
55
class Message(val message: String)
66

7-
val jsonSerializationMessage = Message("Hello, World!")
8-
97
@Serializable
108
data class World(val id: Int, val randomNumber: Int)
119

0 commit comments

Comments
 (0)