Registering a custom REST endpoint framework
Answered
Hi,
I have a plugin that has support for declaring REST endpoints (both via a declaration file and via in-language XQuery annotations).
Is it possible to implement an API so that these endpoints appear in the Endpoints tool window like frameworks supported by IntelliJ.
Kind regards,
Reece
Please sign in to leave a comment.
Reece,
you should implement microservices.endpointsProvider Extension Point with extending the EndpointsProvider class.
Thanks for the information. Do you know what module I need to depend on in plugins.xml for this, and add to intellij.plugins in the gradle-intellij-plugin build.gradle file? Also, is there any documentation for it, as I cannot find it in the intellij-community project or the IntelliJ Platform SDK DevGuide.
In your plugin.xml file, you need to add
and in Gradle configuration:
Thanks. That works.
With IntelliJ 2020.1, using EndpointsProvider gives the error:
> 'com.intellij.microservices.EndpointsProvider' is scheduled for removal in version 202.2454
There is an EndpointsViewProvider that looks like it models the new Endpoints panel (framework > group > endpoint > details), but I don't see a plugin EP to register this.
What is the new way for registering endpoints?
Endpoint can be registered using configuration entry: