The REST API infrastructure now supports "REST Modules". For background, see {T366835} (and its subtasks).
Briefly, a "REST Module" is a set of related endpoints grouped under a name.version portion of the path. For example the endpoints currently available under `/v1/page/{title}` and `/v1/revision/{id}` might become `/content.v1/page/{title}` and `/content.v1/revision/{id}` respectively.
{T365754} introduced the ability for extensions to define modules. Because there are not yet any existing callers to the new Reading Lists REST endpoints, we should move them into a module now, before doing so would require deprecation and migration.
The new module should be called `readinglists.v0`. Paths like `readinglists/v0/lists/setup` should instead become `readinglists.v0/lists/setup`. The module should be specified in a module definition file (among other things, this allows future changes to the endpoint route definitions to be easily identified in git history independently of any changes to extension.json).
This [[ https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ReadingLists/+/1048080 | gerrit change ]] was a hackish attempt at this during code review of the original change to introduce modules, and may be useful.
Completion criteria:
[] all endpoints are converted to be defined via module definition file
[] tests are modified as needed (the paths in mocha tests will need tweaked)
[] comments referring to the old paths are updated (most or all of the handlers have such a comment)
Tip: searching for "v0" should find most places that need changed.