Skip to content

Effortless API documentation tool for Laravel applications. Swagger alternative.

License

Notifications You must be signed in to change notification settings

nick322/laravel-request-docs

Repository files navigation

Laravel Docs Generator

Automatically generate api documentation for Laravel without writing annotations.

Read more: https://medium.com/web-developer/laravel-automatically-generate-api-documentation-without-annotations-a-swagger-alternative-e0699409a59e

Requirements

Lang Version
PHP 7.4 or 8.0
Laravel 6.* or 8.*

Installation

You can install the package via composer:

composer require rakutentech/laravel-request-docs --dev

You can publish the config file with:

php artisan vendor:publish --tag=request-docs-config

Usage

View in the browser on /request-docs/

or generate a static HTML

php artisan lrd:generate

Docs HTML is generated inside docs/.

Design pattern

In order for this plugin to work, you need to follow the design pattern by injecting the request class inside the controller. For extra documentation you can use markdown inside your controller method as well.

Design pattern

Screenshots

Generated API documentation

Preview

Try API

Preview

Testing

./vendor/bin/phpunit

Linting

./vendor/bin/phpcs --standard=phpcs.xml --extensions=php --ignore=tests/migrations config/ src/

Fixing lints

./vendor/bin/php-cs-fixer fix src/
./vendor/bin/php-cs-fixer fix config/

Changelog

  • Initial Release
  • v1.9 Added improvements such as status code, response headers, custom request headers and fixed issues reported by users

About

Effortless API documentation tool for Laravel applications. Swagger alternative.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 54.7%
  • TypeScript 43.3%
  • CSS 1.2%
  • Other 0.8%