GenerationTarget::Server always generates API contracts from your OpenAPI operations, then adds optional framework glue based on FrameworkTarget.
| Target | Generated API Contract | Generated Controller Glue | Generated Route Helper | Best Fit |
|---|---|---|---|---|
FrameworkTarget::None |
*ApiInterface |
No | No | Plain PHP, custom stacks, PSR-based frameworks |
FrameworkTarget::Symfony |
*ApiInterface |
Yes (#[Route] actions) |
No | Symfony apps |
FrameworkTarget::Laravel |
*ApiInterface |
Yes (request/response actions) | Yes (*ApiRoutes) |
Laravel apps |
Regardless of framework target, schema components generate typed models and enums.
fromArray() and toArray() can be generated.None if you want only contracts and implement HTTP handling yourself.Symfony if you want generated route attributes and controller action wrappers.Laravel if you want generated action wrappers plus route helper registration (great for Laravel teams adopting contract-first APIs without heavy platform frameworks).use MaxBeckers\OpenApiGenerator\Config\FrameworkTarget;
use MaxBeckers\OpenApiGenerator\Config\GenerationTarget;
$config->generationTarget = GenerationTarget::Server;
$config->frameworkTarget = FrameworkTarget::Symfony; // none|symfony|laravel