REST & OpenAPI
@shamar/rest is the JSON door next to the HTML panel. The resources you declared for staff screens are the same resources a script can list and update, and the package publishes an OpenAPI document so that API can be browsed. Read REST first if you want the reason to install it. The rest of this page is the registration and the playground URLs.
Add @shamar/rest and register its provider after @shamar/adonis/provider.
// adonisrc providers() => import('@shamar/adonis/provider'),() => import('@shamar/rest/provider'),Open (paths are configurable; playground uses):
/api/docs— Scalar UI- OpenAPI JSON beside that path (see
@shamar/restconfig)
Annotate custom routes:
router.get('/api/users', handler).openapi({ tags: ['Users'], summary: 'List users', query: listValidator, response: listDto,})Resource CRUD under /api/shamar is included automatically when configured.