Currently, the package generates a single OpenAPI spec for all routes. For APIs with multiple versions (/api/v1, /api/v2), there's no way to:
- Auto-detect and group routes by version
- Generate separate specs per version
- Switch between versions in Swagger UI
Proposed Solution
- Auto-detect version prefixes from routes
- Generate separate
openapi-v1.json, openapi-v2.json specs
- Add version switcher dropdown in Swagger UI
- Config option to define version patterns
Example Config
'versions' => [
'v1' => 'api/v1/*',
'v2' => 'api/v2/*',
],