OpenAPI conformant
Generate OpenAPI documents in version 3.0 or 3.1.
Swagger-PHP
Generate OpenAPI documentation for your RESTful API.
Generate OpenAPI documents in version 3.0 or 3.1.
Using swagger-php lets you write the API documentation inside the PHP source files which helps keeping the documentation up-to-date.
Annotations can be either docblocks or PHP 8.1 attributes.
shell
> composer require zircote/swagger-phpAdd 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.
shell
> ./vendor/bin/openapi src -o openapi.yamlUse an OpenAPI tool like Swagger UI or Scalar to explore and interact with your API.