br-routes
Installation
SKILL.md
better-route: custom REST routes
Register the complete router during rest_api_init and declare the access intent of every route.
Minimal public route
use BetterRoute\Http\Response;
use BetterRoute\Router\Router;
add_action('rest_api_init', static function (): void {
$router = Router::make('myapp', 'v1');
$router->get('/ping', static fn (): Response => Response::ok(['pong' => true]))
->publicRoute();
$router->register();
});