feat(api): add Joomla Web Services API for OG tags (closes #27)
Joomla: Repo Health / Access control (push) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Joomla: Repo Health / Access control (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Joomla: Update Server / Update updates.xml (pull_request) Has been cancelled
Joomla: Repo Health / Release configuration (pull_request) Has been cancelled
Joomla: Repo Health / Scripts governance (pull_request) Has been cancelled
Joomla: Repo Health / Repository health (pull_request) Has been cancelled
Joomla: Repo Health / Release configuration (push) Has been cancelled
Joomla: Repo Health / Scripts governance (push) Has been cancelled
Joomla: Repo Health / Repository health (push) Has been cancelled

New sub-extension: plg_webservices_mokoog
- Registers REST API routes via onBeforeApiRoute
- CRUD endpoints at /api/index.php/v1/mokoog/tags
- Lookup endpoint at /api/index.php/v1/mokoog/lookup/:type/:id
- SubscriberInterface pattern with DI container

Component API layer (com_mokoog/api/):
- TagsController extending ApiController for CRUD operations
- JsonapiView with whitelisted fields for JSON:API output
- TagModel (AdminModel) for single-item operations

Package updates:
- pkg_mokoog.xml includes plg_webservices_mokoog
- Install script auto-enables webservices plugin
- Component manifest declares api/ directory

Authored-by: Moko Consulting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan Miller
2026-05-23 22:43:18 -05:00
parent 19035b1171
commit ce0bbe821a
14 changed files with 419 additions and 0 deletions
+11
View File
@@ -73,6 +73,17 @@ class Pkg_MokoOGInstallerScript
$db->setQuery($query);
$db->execute();
// Enable the webservices plugin automatically
$query = $db->getQuery(true)
->update($db->quoteName('#__extensions'))
->set($db->quoteName('enabled') . ' = 1')
->where($db->quoteName('type') . ' = ' . $db->quote('plugin'))
->where($db->quoteName('folder') . ' = ' . $db->quote('webservices'))
->where($db->quoteName('element') . ' = ' . $db->quote('mokoog'));
$db->setQuery($query);
$db->execute();
}
}
}