Plugin + REST + new resource

44 views
Skip to first unread message

Michał Szalko

unread,
Nov 26, 2013, 3:58:32 PM11/26/13
to repo-d...@googlegroups.com
Hi all,

I'm developing a plugin that exposes some functionality over REST and defines a new resource. A sample url then looks like this:


The name of the plugin "myplugin" appears twice. I am mapping my new resource in the plugin directly with serveRegex. Is it possible to make the name of the plugin appear only once in the url? For example http://host/plugins/myresource/1/myplugin~action

BR,
MS


Shawn Pearce

unread,
Nov 26, 2013, 8:03:39 PM11/26/13
to Michał Szalko, repo-discuss
Whoops. No. :-(

This is an oversight in the REST API glue. We really should allow you
to define a new top level collection in your plugin, and then within
that allow your plugin name to be the default plugin name instead of
"gerrit". Unfortunately there are some hard coded assumptions into the
code about the default name being "gerrit".

I would define this as a bug in the glue code. You should be able to
do what you asked.

Michał Szalko

unread,
Nov 28, 2013, 3:16:23 PM11/28/13
to Shawn Pearce, repo-discuss
Reply all
Reply to author
Forward
0 new messages