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

0
6 comments

Reece,

you should implement microservices.endpointsProvider Extension Point with extending the EndpointsProvider class.

0

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.

0

In your plugin.xml file, you need to add

<depends>com.intellij.modules.microservices</depends>

and in Gradle configuration:

setPlugins("microservices", ...)
0

Thanks. That works.

0

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?

0

What is the new way for registering endpoints?

Endpoint can be registered using configuration entry:

<extensions defaultExtensionNs="com.intellij">
     <microservices.endpointsProvider implementation="com.example.YourEndpointsProvider"/>
</extensions>
0

Please sign in to leave a comment.