https://kotlinlang.org logo
#ktor
Title
# ktor
d

Daniel

03/28/2023, 10:29 AM
Is it possible to share type safe definition of the API defined using the Resources plugin between ktor client and server? (io.ktor:ktor-server-resources and io.ktor:ktor-client-resources)
h

hfhbd

03/28/2023, 11:23 AM
This is exactly the use-case and feature of the resources plugin.
👍 1
j

Joe

04/01/2023, 6:05 PM
But how can I do it? Should I use
@Resource
annotation twice (from client and server dependecies)?
h

hfhbd

04/01/2023, 8:06 PM
What do you mean? You should put the resources into your shared module.
5 Views