lorisleiva/laravel-actions) organizes application business logic into reusable action classes that can run as controllers, jobs, listeners, or commands. Geni natively understands this pattern — it detects Action classes registered as routes, resolves the correct execution method, extracts validation rules, documents authorization responses, and derives human-readable operation summaries, all without booting your application.
Routing Resolution
In Laravel Actions, single-action routes are commonly registered by passing the action class name directly to the router:routes/api.php
1
Inspects the AST of the target class
Geni traverses the source file for the registered Action class.
2
Detects the AsAction trait or method presence
It checks for the
Lorisleiva\Actions\Concerns\AsAction trait or equivalent method signatures.3
Selects the execution method
It prefers
asController() as the controller entry point, falling back to handle() if asController() is not defined.Validation Extraction
When an Action class defines arules() method or accepts an ActionRequest, Geni statically parses the returned rules array exactly as it does for dedicated Form Requests:
rules() method above, Geni produces a request body schema with:
name:type: string,maxLength: 255, markedrequired.email:type: string,format: email, markedrequired.
Automatic 403 Response
When an action class defines anauthorize() method containing non-trivial logic (i.e., not simply return true;), Geni automatically documents a 403 Forbidden response alongside the standard success response:
Operation Summary Derivation
When no explicit@summary annotation or #[Endpoint] title is present on an action method, Geni derives a clean, human-readable summary by splitting the action class name on word boundaries and removing common suffixes like Action: