aliaslani / apilex
Automatic generation of API documentation for Laravel applications.
Requires
- php: ^8.1
- illuminate/contracts: ^10.0|^11.0|^12.0|^13.0
- myclabs/deep-copy: ^1.12
- nikic/php-parser: ^5.0
- phpstan/phpdoc-parser: ^1.0|^2.0
- spatie/laravel-package-tools: ^1.9.2
Requires (Dev)
- larastan/larastan: ^3.3
- laravel/pint: ^v1.1.0
- laravel/scout: ^10.0|^11.0
- nunomaduro/collision: ^7.0|^8.0
- orchestra/testbench: ^8.0|^9.0|^10.0|^11.0
- pestphp/pest: ^2.34|^3.7|^4.4
- pestphp/pest-plugin-laravel: ^2.3|^3.1|^4.1
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^10.5|^11.5.3|^12.5.12
- spatie/laravel-permission: ^6.10|^7.2
- spatie/pest-plugin-snapshots: ^2.1
README
Apilex automatically generates OpenAPI 3.1.0 specification and interactive documentation for Laravel projects without requiring you to manually write PHPDoc annotations or attributes.
Author & Maintainer
Developed and maintained by Ali Aslani (me@aliaslani.dev).
Introduction
The main objective of Apilex is to generate precise, zero-config API documentation directly from your code implementation.
This allows developers to focus on writing clean code and avoiding tedious manual annotations that frequently become outdated. By analyzing your codebase dynamically, Apilex keeps your API documentation always in sync with your real endpoints.
Features
- 🚀 Zero-Config: Generates docs without mandatory code annotations.
- âš¡ OpenAPI 3.1.0 Standard: Outputs strict, standardized schema definitions.
- 🎨 Interactive UI: Built-in documentation UI viewer out-of-the-box.
- 📦 Laravel Support: Supports Laravel 10.x, 11.x, 12.x, and 13.x.
Installation
You can install the package via Composer:
composer require aliaslani/apilex
Usage
After installation, the following default routes will be available in your application:
/docs/api- Interactive UI viewer for your API documentation./docs/api.json- OpenAPI specification document in JSON format.
By default, documentation routes are enabled in the local environment.
License
The MIT License (MIT). Please see LICENSE.md for more information.