HTTP API With Zero Per-Operation Controllers
Turns every operation of every worker registered in a Backbone package registry into an HTTP endpoint automatically — no per-operation controller code, self-documenting as HATEOAS resources and an OpenAPI 3.1 spec.
Why
Instead of writing POST /invoices/build → InvoiceController::build() by hand for each operation, you write one generic route pointing at one controller, and the URL path itself tells the package which worker method to call. The actual resolution and invocation is delegated entirely to derafu/backbone-dispatcher, which is transport-agnostic — this package only deals with the HTTP-specific concerns: parsing the route, listing packages/components/workers as browsable resources, serving OpenAPI documentation, and extracting parameters from the request body.
Installation
composer require derafu/backbone-api
There is no bundled route table or DI wiring — wiring Dispatcher and a controller into your framework’s routes and container is left to your application.
Requirements
PHP 8.5+. Depends on derafu/backbone, derafu/backbone-dispatcher, psr/http-message, and psr/http-factory (for building the real failure response — a concrete PSR-17 implementation, e.g. nyholm/psr7, is the consuming application’s to provide).