draw/open-api
PHP library for manipulating OpenAPI (Swagger) documents. Focused on OpenAPI/Swagger 2.0 only, providing tools to read, update, and work with API definitions in code.
draw/open-api package (v2.0) is a lightweight PHP library for manipulating OpenAPI specifications. It is well-suited for projects where:
darkaonline/l5-swagger, zircote/swagger-php) already handle OpenAPI 3.x, so this package may feel redundant unless maintaining backward compatibility with OpenAPI 2.0 is critical.darkaonline/l5-swagger, this package doesn’t plug into Laravel’s service container or route system out-of-the-box. Custom middleware or service providers would be needed to bridge it.@OA\*), this package may not align with Laravel’s existing tools (e.g., illuminate/support annotations). A hybrid approach (e.g., parsing route definitions) might be required.l5-swagger) or supplement it?zircote/swagger-php (OpenAPI 3.x) or darkaonline/l5-swagger (Laravel-native) achieve the same goals with less risk?ValidateAgainstOpenApi).spatie/fractal for API resource transformation or nWidart/laravel-modules if modularizing API specs.symfony/yaml for YAML spec handling if the package’s JSON-only support is limiting.openapi3-validator alongside this package temporarily).components/schemas).symfony/yaml as a wrapper.l5-swagger or zircote/swagger-php could cause spec duplication or versioning conflicts.| Step | Task | Dependencies | Owner |
|---|---|---|---|
| 1 | Package Installation | PHP 8.x, Laravel | DevOps |
| 2 | Service Provider Setup | Laravel container | Backend |
| 3 | Artisan Command for Spec Generation | Route definitions | Backend |
| 4 | Middleware for Validation | OpenAPI spec | Backend |
| 5 | CI/CD Pipeline for Spec Updates | GitHub Actions/GitLab CI | DevOps |
| 6 | Documentation Update | Generated specs | Tech Writer |
| 7 | Pilot Testing | Non-critical API | QA |
| 8 | Full Rollout | All APIs | Team |
/api/v1/openapi.json) to avoid breaking changes.Invalid request: missing required field 'user_id').storage/app/openapi.json.Accept: application/internal header).How can I help you explore Laravel packages today?