PHPackages                             pandaleague/openapibuilder - 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. pandaleague/openapibuilder

ActiveLibrary[API Development](/categories/api)

pandaleague/openapibuilder
==========================

1.0.0(2w ago)13.2k—1%1MITPHPPHP ^8.3CI passing

Since May 4Pushed 2w agoCompare

[ Source](https://github.com/pandaleague/OpenApiBuilder)[ Packagist](https://packagist.org/packages/pandaleague/openapibuilder)[ RSS](/packages/pandaleague-openapibuilder/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (2)Versions (7)Used By (0)

OpenApiBuilder
==============

[](#openapibuilder)

A small, fluent PHP library for assembling [OpenAPI 3.0](https://spec.openapis.org/oas/v3.0.3) specifications as PHP arrays — ready to encode to JSON or YAML.

Requirements
------------

[](#requirements)

- PHP 8.3+
- `illuminate/contracts` ^11 || ^12

Installation
------------

[](#installation)

```
composer require pandaleague/openapibuilder
```

Quick example
-------------

[](#quick-example)

```
use PandaLeague\OpenApiBuilder\{
    OpenApi, Info, Path, Operation, Parameter, Response, MediaType, Schema
};

$listPets = (new Operation())
    ->tag('Pets')
    ->summary('List pets')
    ->operationId('listPets')
    ->parameter(
        new Parameter('limit', Parameter::IN_QUERY, new Schema(['type' => 'integer']))
    )
    ->response(
        200,
        (new Response('A list of pets'))
            ->content(
                'application/json',
                (new MediaType())->schema(new Schema([
                    'type'  => 'array',
                    'items' => ['$ref' => '#/components/schemas/Pet'],
                ]))
            )
    );

$openApi = new OpenApi(
    '3.0.0',
    new Info('Pet Store API', '1.0.0'),
    ['/pets' => (new Path())->get($listPets)]
);

echo json_encode($openApi->toArray(), JSON_PRETTY_PRINT);
```

All builder classes implement `Illuminate\Contracts\Support\Arrayable`, so `toArray()` produces the final spec.

Development
-----------

[](#development)

Install dev dependencies and run the test suite:

```
composer install
composer test
```

License
-------

[](#license)

MIT

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance96

Actively maintained with recent releases

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 61.5% 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

Unknown

Total

1

Last Release

19d ago

### Community

Maintainers

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

---

Top Contributors

[![Ed-leRoux](https://avatars.githubusercontent.com/u/10370397?v=4)](https://github.com/Ed-leRoux "Ed-leRoux (16 commits)")[![raphacosta](https://avatars.githubusercontent.com/u/1066077?v=4)](https://github.com/raphacosta "raphacosta (4 commits)")[![sgleave](https://avatars.githubusercontent.com/u/3275169?v=4)](https://github.com/sgleave "sgleave (4 commits)")[![gdsmith](https://avatars.githubusercontent.com/u/908695?v=4)](https://github.com/gdsmith "gdsmith (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pandaleague-openapibuilder/health.svg)

```
[![Health](https://phpackages.com/badges/pandaleague-openapibuilder/health.svg)](https://phpackages.com/packages/pandaleague-openapibuilder)
```

###  Alternatives

[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M100](/packages/dedoc-scramble)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.8k3](/packages/defstudio-telegraph)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[neuron-core/neuron-laravel

Official Neuron AI Laravel SDK.

11337.8k1](/packages/neuron-core-neuron-laravel)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[lettermint/lettermint-laravel

Official Lettermint driver for Laravel

1190.2k1](/packages/lettermint-lettermint-laravel)

PHPackages © 2026

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