PHPackages                             ark4ne/laravel-openapi-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ark4ne/laravel-openapi-generator

ActiveLibrary[API Development](/categories/api)

ark4ne/laravel-openapi-generator
================================

OpenApi - Laravel Documentation Generator

v0.6.0(3mo ago)615.7k↓41.2%MITPHPPHP ^8.1CI passing

Since Jun 1Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/Ark4ne/laravel-openapi-generator)[ Packagist](https://packagist.org/packages/ark4ne/laravel-openapi-generator)[ RSS](/packages/ark4ne-laravel-openapi-generator/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (9)Versions (43)Used By (0)

OpenApi - Laravel Documentation Generator
=========================================

[](#openapi---laravel-documentation-generator)

A OpenApi documentation generator for Laravel.

[![example branch parameter](https://github.com/Ark4ne/laravel-openapi-generator/actions/workflows/php.yml/badge.svg)](https://github.com/Ark4ne/laravel-openapi-generator/actions/workflows/php.yml/badge.svg)[![codecov](https://camo.githubusercontent.com/f1b3165dfdffc3aaea634b94d1274cd776e761648adc5ec476f2876d27621ed1/68747470733a2f2f636f6465636f762e696f2f67682f41726b346e652f6c61726176656c2d6f70656e6170692d67656e657261746f722f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d463758424c4147544450)](https://codecov.io/gh/Ark4ne/laravel-openapi-generator)

Installation
============

[](#installation)

```
composer require ark4ne/laravel-openapi-generator
```

Usage
=====

[](#usage)

```
php artisan openapi:generate
```

Config
======

[](#config)

...

Versions
--------

[](#versions)

The "Versions" section allows you to specify different configurations for each version of your API.

### `output-file`

[](#output-file)

Output-file name.

### `title`

[](#title)

Document title.

### `description`

[](#description)

Document description.

### `routes`

[](#routes)

Define which routes will be processed. The pattern must be a shell mask.

```
'routes' => [
    'api/*'
],

```

### `groupBy`

[](#groupby)

Document description. Used to group API routes.

#### `by`

[](#by)

Define a group by according to :

- controller : The route controller class
- uri : The route uri
- name : The route name

#### `regex`

[](#regex)

Define a regex that will retrieve the name of the group.

ex:

```
'groupBy' => [
    'by' => 'controller',
    'regex' => '/^App\\\\Http\\\\(\w+)/'
],

```

With this, routes will be grouped by controller class name.

### `ignore-verbs`

[](#ignore-verbs)

HTTP verbs to ignore.

Parses
------

[](#parses)

Define all parser used for documentate a specific class.

For each object, only one parser will be used.
For instance :

```
class MyResourceCollection extends ResourceCollection {}

```

`ResourceCollectionParser` and `JsonResourceParser` are eligible, because `MyResourceCollection` extends from `ResourceCollection` which extends from `JsonResource`.

The order of the parsers will define which parser we will use: 1st eligible =&gt; parser used.

For `MyResourceCollection` we will therefore use `ResourceCollection`.

### `requests`

[](#requests)

Requests parsers.

### `rules`

[](#rules)

Request rules parsers.

### `responses`

[](#responses)

Responses parsers.

### `middlewares`

[](#middlewares)

Surcharge global middlewares config.

@see [Middlewares](#middlewares)

Format
------

[](#format)

### `date`

[](#date)

Defines how date formats will be understood.

Middlewares
-----------

[](#middlewares-1)

Defines middlewares transformers.

For each middlewares, you can define a transformer that will be used to transform the request or responses.

```
'middlewares' => [
     'auth:sanctum' => [
         \Ark4ne\OpenApi\Transformers\Middlewares\ApplyBearerTokenSecurity::class,
     ],
     \Illuminate\Foundation\Http\Middleware\VerifyCsrfToken::class => [
         \Ark4ne\OpenApi\Transformers\Middlewares\ApplyCsrfSecurity::class,
     ]
],
```

Connections
-----------

[](#connections)

### `use-transaction`

[](#use-transaction)

Defines whether to use transactions on different database connections.

Using transaction will create and save models via factories. The saved models will be deleted at the end of the generation via a rollback.

Without transactions, models will be created but not saved, which can lead to errors during generation.

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance82

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~25 days

Total

42

Last Release

95d ago

PHP version history (2 changes)v0.0.0PHP ^8.0

v0.0.x-devPHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/a9364c697a58ed619a061145dc64c8ee6bbd0536c4594ab3c2b0ffce3e902bc5?d=identicon)[Ark4ne](/maintainers/Ark4ne)

---

Top Contributors

[![Ark4ne](https://avatars.githubusercontent.com/u/6144058?v=4)](https://github.com/Ark4ne "Ark4ne (175 commits)")

---

Tags

generatorlaravelopenapilaraveldocumentationopenapigenerator

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ark4ne-laravel-openapi-generator/health.svg)

```
[![Health](https://phpackages.com/badges/ark4ne-laravel-openapi-generator/health.svg)](https://phpackages.com/packages/ark4ne-laravel-openapi-generator)
```

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k36.4M126](/packages/darkaonline-l5-swagger)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k13.5M59](/packages/knuckleswtf-scribe)[swisnl/openapi-spec-generator

Creates Open API spec for a Laravel JSON:API

2341.2k](/packages/swisnl-openapi-spec-generator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
