Is there a “road to no longer experimental” task/i...
# ktor
r
Is there a “road to no longer experimental” task/issue I can follow for Ktor Locations?
a
In the Ktor 2.0.0, a new plugin is called Resources.
r
Oh. So Locations are dropped and replaced by this
a
Yes
👍 1
d
Is it planned that more than just two levels will be supported by the plugin in the future?
a
What levels are you talking about?
d
I had misinterpreted the requirement here that the parent must be listed in the constructor. Therefore I had included both the parent and grandparent in the third level, but this is not necessary and leads to an exception. So it was my mistake and it now works with more than two levels.
Copy code
@Serializable
@Resource("/a")
class A {
    @Serializable
    @Resource("b")
    class B(val parent: A = A()) {
        @Serializable
        @Resource("c")
        class C(val parent: B = B())
        // Does not work...
        // class C(val parent: B = B(), val grandparent: A = A())
    }
}