Each plugin directory should stand on its own. All the REST handling should come from a single index.php in the folder that simply passes the escaped POST request to the plugin script, then prints the output back out.
As described in the "Plugin accepts" section of the wiki
Each plugin directory should stand on its own. All the REST handling should come from a single index.php in the folder that simply passes the escaped POST request to the plugin script, then prints the output back out.
As described in the "Plugin accepts" section of the wiki