zircote/swagger-php
swagger-php generates OpenAPI 3.0/3.1/3.2 documentation from your PHP 8.2+ code using attributes (preferred) or optional Doctrine annotations. Use it via CLI or programmatically, with helpful error reporting and a full documentation site.
Swagger-PHP 3.x generates an openapi.json file that follows the OpenAPI Version 3.0.x Specification.
If you need to output the older 2.x specification, use OpenApi-php 2.x
This aligns better with the direction of the swagger documentation and examples.
Annotations can't be used as string anymore, you'll need to call toYaml() or toJson() if you prefer the JSON format.
-o or >The namespace is renamed from SWG (Swagger) to OA (OpenApi)
The specification uses the term "Path Item Object", updated the annotation to reflect that.
Use @OA\Schema() instead of @OA\Definition() and update the references from "#/definitions/something" to "#/components/schemas/something".
Use @OA\PathItem instead of @SWG\Path and update references.
Use @OA\MediaType to set data format.
Rename #/parameters/{parameter_name} to #/components/parameters/{parameter_name}
Rename #/responses/{response} to #/components/responses/{response}
Renamed swagger to openapi
How can I help you explore Laravel packages today?