Server-side typesafe Spine schema usage • opensavvy.spine.server • TypedResponseScope • idOf
idOf¶
Extracts the identifier for a DynamicResource as it was provided by the client.
For example, if we declare the following API:
object Api : RootResource("api") {
object Users : StaticResource<Api>("users", Api) {
object User : DynamicResource<Users>("user", Users) {
val get by get()
}
}
}
and the client calls the endpoint GET /api/users/123, then we can declare our route as: