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.
layout: home hero: name: Swagger-PHP tagline: Generate OpenAPI documentation for your RESTful API. actions: - theme: brand text: User Guide → link: /guide/ features:
> composer require zircote/swagger-php
Add swagger-php attributes (or legacy annotations) to your source code.
⚠️ The doctrine/annotations library used to parse annotation is going to be deprecated, so wherever
possible attributes should be used.
<<< @/snippets/minimal_api_at.php
<<< @/snippets/minimal_api_an.php
> ./vendor/bin/openapi src -o openapi.yaml
Use an OpenAPI tool like Swagger UI or Scalar to explore and interact with your API.
How can I help you explore Laravel packages today?