switon / openapi
Split OpenAPI YAML workflow with route sync, merged export, and spec quality lint for Switon Framework
v1.0.1
2026-08-22 14:28 UTC
Requires
- php: >=8.3
- ext-json: *
- switon/command: ^1.0
- switon/core: ^1.0
- switon/http: ^1.0
- switon/router: ^1.0
- switon/yaml: ^1.0
Requires (Dev)
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.0
- switon/testing: ^1.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Switon's OpenAPI pipeline for collecting routes, merging YAML fragments, syncing stubs, and exporting JSON specs.
Highlights
- Document assembly: route metadata and YAML fragments are merged into one OpenAPI document.
- Route collection: HTTP controllers can be scanned into OpenAPI entries.
- Stub sync: discovered routes can generate missing controller and component stubs.
- CLI workflow:
open-api:init,open-api:sync,open-api:export, andopen-api:lintcover the spec loop. - Spec helpers: response schema guessing and sample-to-schema conversion reduce manual work.
Installation
composer require switon/openapi
Quick Start
bash bin/console open-api:init bash bin/console open-api:sync bash bin/console open-api:export bash bin/console open-api:lint
Docs: https://github.com/switon-php/openapi/blob/main/docs/README.md
License
MIT.