diff --git a/docs/source/plugins/routes.rst b/docs/source/plugins/routes.rst index e5023675..a7c2618b 100644 --- a/docs/source/plugins/routes.rst +++ b/docs/source/plugins/routes.rst @@ -21,7 +21,9 @@ For example, your ``api_views`` dictionary may look like: '/myplugin': MyRouteAPI, } -Here, ``MyRouteAPI`` is a web API plugin class, subclassing :py:class:`openflexure_microscope.api.v1.views.MicroscopeViewPlugin`. If your plugin package were named ``mypluginpackage``, an API route would be automatically added at ``/api/v1/plugin/mypluginpackage/myplugin``. +Here, ``MyRouteAPI`` is a web API plugin class, subclassing :py:class:`openflexure_microscope.api.v1.views.MicroscopeViewPlugin`. If your plugin package were named ``myplugins.package``, an API route would be automatically added at ``/api/v1/plugin/myplugins/package/myplugin``. + +The full URL that your plugin will attach to is essentially identical to it's full module path. That is, if your plugin is loaded from ``my_microscope_plugins.mypluginpackage:MyPluginClass``, then your plugin routes will appear at ``/plugin/my_microscope_plugins/mypluginpackage/``. While this means that plugin routes can get long very quickly, they will generally only ever be accessed by client applications, and so this generally should not be a problem. The MicroscopeViewPlugin class ------------------------------