PHPackages                             blumilksoftware/openapi-toolbox - 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. blumilksoftware/openapi-toolbox

ActiveLibrary[API Development](/categories/api)

blumilksoftware/openapi-toolbox
===============================

OpenAPI handy toolbox for Laravel applications.

v3.0.0(1y ago)42.5k—0%[6 issues](https://github.com/blumilksoftware/openapi-toolbox/issues)MITPHPPHP ^8.3CI passing

Since May 29Pushed 1y ago3 watchersCompare

[ Source](https://github.com/blumilksoftware/openapi-toolbox)[ Packagist](https://packagist.org/packages/blumilksoftware/openapi-toolbox)[ Docs](https://github.com/blumilksoftware/openapi-toolbox)[ RSS](/packages/blumilksoftware-openapi-toolbox/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (10)Versions (8)Used By (0)

[![Packagist PHP Version Support](https://camo.githubusercontent.com/2fdfcb8ab11e7758f219b544ebbefdaa6d5c0a8d7fa986b3bbb19dffb33d990e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f626c756d696c6b736f6674776172652f6f70656e6170692d746f6f6c626f783f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/blumilksoftware/openapi-toolbox)[![Packagist Version](https://camo.githubusercontent.com/a5c63e8b52918fbd1bfba912491bfdb0d48ef1447d37e94627eeb79224ffa78e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626c756d696c6b736f6674776172652f6f70656e6170692d746f6f6c626f783f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/blumilksoftware/openapi-toolbox)[![Packagist Downloads](https://camo.githubusercontent.com/97f80d25862b81fc5037bc67e2b82bfb9072c31be65d93bf1a05312c0af1a78f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626c756d696c6b736f6674776172652f6f70656e6170692d746f6f6c626f783f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/blumilksoftware/openapi-toolbox/stats)

🧰 openapi-toolbox
-----------------

[](#-openapi-toolbox)

OpenAPI Toolbox is a handy package with all important documentation-related features we are using in some of **[@blumilksoftware](https://github.com/blumilksoftware)** projects.

### Installation

[](#installation)

Install package via Composer and publish configuration file:

```
composer require blumilksoftware/openapi-toolbox
php artisan vendor:publish

```

If you need it only for internal development (no documentation serving) you can install it with a development flag:

```
composer require blumilksoftware/openapi-toolbox --dev
php artisan vendor:publish

```

### Configuration

[](#configuration)

Configuration file should be published into your application after running `php artisan vendor:publish` command. It should look like below:

```
return [
    "default" => "openapi",
    "documentations" => [
        "openapi" => [
            "format" => Format::YmlToJson,
            "specification" => [
                "path" => resource_path("openapi"),
                "index" => "openapi.yml",
                "allow_multiple_files" => false,
            ],
             "cache" => [
                "enabled" => false,
                "driver" => "default",
                "key" => "openapi",
            ],
            "ui" => [
                "enabled" => false,
                "single_source" => false,
                "title" => "Documentation",
                "routing" => [
                    "prefix" => "documentation",
                    "name" => "documentation",
                    "middlewares" => [],
                ],
                "provider" => UIProvider::Elements,
            ],
        ],
    ],
    "providers" => [
        "elements" => [
            "script" => [
                "src" => "https://unpkg.com/@stoplight/elements@7.7.16/web-components.min.js",
                "sri" => "sha384-bwBnouovwwSJc5fWe7VFNxRg+T2lPHhUcHIzdf7mFfqTZkYtM3T/ehzfEr8F02yY",
            ],
            "stylesheet" => [
                "href" => "https://unpkg.com/@stoplight/elements@7.7.16/styles.min.css",
                "sri" => "sha384-1lLf7J28IOR7k5RlItk6Y+G3hDgVB3y4RCgWNq6ZSwjYfvJXPtZAdW0uklsAZbGW",
            ],
        ],
        "swagger" => [
            "script" => [
                "src" => "https://unpkg.com/swagger-ui-dist@4.5.0/swagger-ui-bundle.js",
                "sri" => "sha384-xy3YXp34ftsoHshRtcUFjOl/M22B5OEHD5S9AjtVzQokz+BxNff8vNW08msKmH46",
            ],
            "stylesheet" => [
                "href" => "https://unpkg.com/swagger-ui-dist@4.5.0/swagger-ui.css",
                "sri" => "sha384-pzdBB6iZwPIzBHgXle+9cgvKuMgtWNrBopXkjrWnKCi3m4uJsPPdLQ4IPMqRDirS",
            ],
        ],
    ],
];
```

### Features

[](#features)

#### Multiple documentations

[](#multiple-documentations)

You can create more than one documentation by adding element to `openapi_toolbox.documentations` array.

```
return {
    "test" => [
        "format" => Format::YmlToJson,
        "specification" => [
            "path" => resource_path("documentation/test"),
            "index" => "openapi.yml",
            "allow_multiple_files" => false,
        ],
        "cache" => [
            "enabled" => false,
            "driver" => "default",
            "key" => "openapi",
        ],
        "ui" => [
            "enabled" => false,
            "single_source" => false,
            "title" => "Test documentation",
            "routing" => [
                "prefix" => "documentation/test",
                "name" => "documentation.test",
                "middlewares" => [],
            ],
            "provider" => UIProvider::Elements,
        ],
    ],
}
```

#### OpenAPI documentation UI

[](#openapi-documentation-ui)

With configuration `ui.enabled = true` a documentation UI will be built from configurable path and served on configurable route. Currently, the [Stoplight Elements](https://stoplight.io/open-source/elements) and [Swagger UI](https://swagger.io/tools/swagger-ui/) are only available UI base components configurable by `ui.provider` setting.

By default, it should be one documentation available under `GET /documentation`.

By changing configuration variable `ui.single_source` to `true`, application will serve already built single source file for GUI.

#### OpenAPI documentation endpoint

[](#openapi-documentation-endpoint)

Serving a documentation itself can be tricky, especially if specification is built from multiple nested files. Here OpenAPI specification files will be built accordingly to configuration and by default the result should be available under `GET /documentation/raw`.

#### OpenAPI specification validation

[](#openapi-specification-validation)

OpenAPI specification files will be built accordingly to configuration and validated on demand by running an Artisan command:

```
php artisan openapi:validate {documentation}

```

Good example of usage would be adding this command to CI pipeline for opened pull requests.

#### Testing requests and responses against OpenAPI specification

[](#testing-requests-and-responses-against-openapi-specification)

Based on [kirschbaum-development/laravel-openapi-validator](https://github.com/kirschbaum-development/laravel-openapi-validator), special trait added to selected PHPUnit test cases enables validation against application's OpenAPI specification:

```
use \Blumilk\OpenApiToolbox\OpenApiCompatibility\OpenApiCompatibility;

```

By default, the documentation will be used from `openapi_toolbox.default` option. You should consider to override `getDocumentationName()` or `getDocumentationConfig()` method to select documentation you want to test.

Every time any HTTP call to application would be performed during tests, additional validation will be performed and structure of requests and responses will be checked against OpenAPI specification. For special cases (e.g. testing invalid requests) this validation can be disabled by using `$this->withoutRequestValidation()` and `$this->withoutResponseValidation()`.

With configuration `cache.enabled = true` internal builders will use cached OpenAPI specifications. You can change the cache store by setting the `cache.driver` option, for example: `cache.driver = redis`. Make sure to use one of the cache drivers available in your Laravel application.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 81.8% 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 ~135 days

Recently: every ~145 days

Total

6

Last Release

407d ago

Major Versions

v1.3.0 → v2.0.02024-10-24

v2.0.0 → v3.0.02025-04-07

PHP version history (2 changes)v1.0.0PHP ^8.2

v2.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/1510fdd451ceac1e63932de54f75090327040d34363b259221626fb185a7c613?d=identicon)[krzysztofrewak](/maintainers/krzysztofrewak)

---

Top Contributors

[![krzysztofrewak](https://avatars.githubusercontent.com/u/10898728?v=4)](https://github.com/krzysztofrewak "krzysztofrewak (18 commits)")[![Baakoma](https://avatars.githubusercontent.com/u/16743001?v=4)](https://github.com/Baakoma "Baakoma (2 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (1 commits)")[![kamilpiech97](https://avatars.githubusercontent.com/u/29115024?v=4)](https://github.com/kamilpiech97 "kamilpiech97 (1 commits)")

---

Tags

elementslaravelopenapiswaggertestslaravelswaggeropenapielements

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/blumilksoftware-openapi-toolbox/health.svg)

```
[![Health](https://phpackages.com/badges/blumilksoftware-openapi-toolbox/health.svg)](https://phpackages.com/packages/blumilksoftware-openapi-toolbox)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[andreaselia/laravel-api-to-postman

Generate a Postman collection automatically from your Laravel API

1.0k586.2k3](/packages/andreaselia-laravel-api-to-postman)[kirschbaum-development/laravel-openapi-validator

Automatic OpenAPI validation for Laravel HTTP tests

581.1M5](/packages/kirschbaum-development-laravel-openapi-validator)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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