https://kotlinlang.org logo
Title
r

Ryan Woodcock

04/19/2023, 2:09 AM
Hey, I'm working on moving to using the Resource plugin on the server for type-safe requests, however it seems like those endpoints aren't picked up by the intellij plugin. Is this intended or is there something I am missing?
a

Aleksei Tirman [JB]

04/19/2023, 7:42 AM
Do you mean that they aren’t present in a generated OpenAPI specification?
r

Ryan Woodcock

04/19/2023, 7:44 AM
Sorry I mean they aren't present in the endpoints panel on the side (as shown in this screenshot) I have a resource with routes along the lines of
@Resource("/sites")
class Sites() {}

routing {
    get<Sites>() { ... }
    post<Sites>() { ... }
}
a

Aleksei Tirman [JB]

04/19/2023, 8:21 AM
Unfortunately, I cannot reproduce this problem with the latest EAP version (IU-232.4421) of IDEA. The problem might be already fixed in a newer version of IntelliJ IDEA.
r

Ryan Woodcock

04/19/2023, 8:21 AM
I'll switch to EAP and see if I can reproduce
Hmm strange, I have the exact same issue on EAP still. Other potentially useful pieces of info • It is a multimodule project • I'm using an extension function for the routes • The @Resource declaration isn't in the same file
a

Aleksei Tirman [JB]

04/19/2023, 8:31 AM
Can you file an issue with a sample project attached?
r

Ryan Woodcock

04/19/2023, 8:37 AM
Sure thing, will take me a bit to recreate it so may not see the issue till tomorrow
Ah I found the root of the issue, I was using the Resources themselves from another module that is a multiplatform module (so I can share the resource classes between my client and server for end-to-end type safety). Moving them into the server module itself solved the issue instantly. Would an issue with a sample project still be useful for resolving this?