Skip to content

Add support for versioned API documentation (v1, v2, etc.) #9

@stackmasteraliza

Description

@stackmasteraliza

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/*',
],

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions