PHPackages                             th3mouk/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. th3mouk/openapi-generator

ActiveLibrary[API Development](/categories/api)

th3mouk/openapi-generator
=========================

PHP library which provide a scaffolding and generate an OpenAPI file

0.3.0(5y ago)2281MITPHPPHP &gt;=7.4CI failing

Since Sep 27Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Th3Mouk/OpenAPIGenerator)[ Packagist](https://packagist.org/packages/th3mouk/openapi-generator)[ RSS](/packages/th3mouk-openapi-generator/feed)WikiDiscussions master Synced 3d ago

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

Open API Generator
==================

[](#open-api-generator)

This PHP library allows you to cut and organize your **HUGE** `openapi.yml` file, into small slices.

Versioning and deploy your OpenAPI documentation become easier.

[![Latest Stable Version](https://camo.githubusercontent.com/9f84c2d977aba66e98a2cf77dd587881445429769d2a72bff14a89ae09a84df1/68747470733a2f2f706f7365722e707567782e6f72672f7468336d6f756b2f6f70656e6170692d67656e657261746f722f762f737461626c65)](https://packagist.org/packages/th3mouk/openapi-generator)[![Latest Unstable Version](https://camo.githubusercontent.com/cafc5678312553fcf3163d6c820ae252e32a54cbd67836b3c282a3c2a1198233/68747470733a2f2f706f7365722e707567782e6f72672f7468336d6f756b2f6f70656e6170692d67656e657261746f722f762f756e737461626c65)](https://packagist.org/packages/th3mouk/openapi-generator)[![Total Downloads](https://camo.githubusercontent.com/1286f8f86d059939088c01808934007db3a58cfcaad1820fd6fe64d9596b42e5/68747470733a2f2f706f7365722e707567782e6f72672f7468336d6f756b2f6f70656e6170692d67656e657261746f722f646f776e6c6f616473)](https://packagist.org/packages/th3mouk/openapi-generator)[![License](https://camo.githubusercontent.com/a3a532cda9fd9764b1fdaae6be39f8edcde538a6529c32ba43be77b9e4d08e2b/68747470733a2f2f706f7365722e707567782e6f72672f7468336d6f756b2f6f70656e6170692d67656e657261746f722f6c6963656e7365)](https://packagist.org/packages/th3mouk/openapi-generator)

[![Build Status](https://camo.githubusercontent.com/edf08c3cb9a545e71bacfc86068fd835cfdb96b13ee94bf25bfdd639a8fcf168/68747470733a2f2f7472617669732d63692e6f72672f7468336d6f756b2f6f70656e61706967656e657261746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/th3mouk/openapigenerator)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/58821fa241f35a697b8355149c0069398bd2124dfbc2973f37fb664a2ad79455/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7468336d6f756b2f6f70656e61706967656e657261746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/th3mouk/openapigenerator/?branch=master)

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

[](#installation)

`composer require th3mouk/openapi-generator`

Usage
-----

[](#usage)

Inside your project you can now run additional commands:

- `vendor/bin/openapi scaffold`
- `vendor/bin/openapi generate`

### Scaffold

[](#scaffold)

To prepare your project, run the first command `scaffold`.

It will create new folders.

```
specs
├── components
│   ├── schemas
│   ├── responses
│   ├── parameters
│   ├── examples
│   ├── requestBodies
│   ├── headers
│   ├── securitySchemes
│   ├── links
│   └── callbacks
└── paths
```

### Add your schema

[](#add-your-schema)

I personnaly use [Swagger OpenAPI specifications](https://swagger.io/specification/) to write my schema.

One example of organization can be :

```
specs
├── components
└── paths
    ├── authentication
    │   ├── login.yaml
    │   └── register.yaml
    └── unicorn
        ├── list.yaml
        └── detail.yaml
```

### Generate

[](#generate)

The command `vendor/bin/openapi generate` take arguments and options to generate the `openapi.yml` file.

You can add a path like this `vendor/bin/openapi generate /in-this-folder/sub`

And it exists a `--pretty-json` or `-p` option to obtain a human readable file.

Please
------

[](#please)

Feel free to improve this library.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

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 ~133 days

Recently: every ~166 days

Total

6

Last Release

2170d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5006899?v=4)[Jérémy](/maintainers/Th3Mouk)[@Th3Mouk](https://github.com/Th3Mouk)

---

Top Contributors

[![Th3Mouk](https://avatars.githubusercontent.com/u/5006899?v=4)](https://github.com/Th3Mouk "Th3Mouk (14 commits)")

---

Tags

generatoropenapiopenapi-generatoropenapi-specificationrestyaml-processor

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k49](/packages/friendsoftypo3-content-blocks)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M729](/packages/sylius-sylius)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M413](/packages/drupal-core-recommended)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M560](/packages/shopware-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M200](/packages/sulu-sulu)

PHPackages © 2026

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