CLOVIS
12/18/2025, 8:00 AMval listUsers by get()
.response<List<User>>()
val createUser by post()
.request<UserCreationDto>()
.response<User>()
route(Users.createUser) {
val created = userService.create(
username = body.username, // Automatic type-safe access to the body
age = body.age,
)
respond(created) // Automatic type-safe serialization of the response
}
val user = client.request(User.createUser, UserCreationDto("Bob", 21)) // Automatic type-safe body as a parameter
.bodyOrThrow() // Automatic type-safe deserialization of the response
In Spine 0.9.0, introducing:
• Type-safe error management
• A brand new documentation website!
spine.opensavvy.dev • Chat in #C078Z1QRHL3andylamax
12/18/2025, 8:25 AM