PHPackages                             marcelthole/openapi-merge - 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. marcelthole/openapi-merge

ActiveApplication[API Development](/categories/api)

marcelthole/openapi-merge
=========================

Merge multiple OpenAPI YML/JSON files into one

2.5.0(3mo ago)1991.0k↓73.3%7[1 issues](https://github.com/marcelthole/openapi-merge/issues)[1 PRs](https://github.com/marcelthole/openapi-merge/pulls)4MITPHPPHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Oct 23Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/marcelthole/openapi-merge)[ Packagist](https://packagist.org/packages/marcelthole/openapi-merge)[ RSS](/packages/marcelthole-openapi-merge/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)Dependencies (8)Versions (24)Used By (4)

OpenAPI Merge
=============

[](#openapi-merge)

[![Test Status](https://github.com/marcelthole/openapi-merge/workflows/Tests/badge.svg)](https://github.com/marcelthole/openapi-merge/actions)[![Docker Build Status](https://github.com/marcelthole/openapi-merge/workflows/Docker-Build/badge.svg)](https://github.com/marcelthole/openapi-merge/actions)[![codecov](https://camo.githubusercontent.com/4a28342db117bf1b06e3fdcbabc19246d425c41ba43880b232da187d9bc9da76/68747470733a2f2f636f6465636f762e696f2f67682f6d617263656c74686f6c652f6f70656e6170692d6d657267652f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d64666656626871787667)](https://codecov.io/gh/marcelthole/openapi-merge)[![Mutation testing badge](https://camo.githubusercontent.com/764981330214c273139579342db0c3ae602ea95f6c0ae65a460d068687f9206a/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d2532466d617263656c74686f6c652532466f70656e6170692d6d657267652532466d61696e)](https://dashboard.stryker-mutator.io/reports/github.com/marcelthole/openapi-merge/main)[![Latest Stable Version](https://camo.githubusercontent.com/e94d54eadee28a53ed4143e8383ba101c249d079d2b257a506244489ff33d8ee/68747470733a2f2f706f7365722e707567782e6f72672f6d617263656c74686f6c652f6f70656e6170692d6d657267652f76)](//packagist.org/packages/marcelthole/openapi-merge)[![License](https://camo.githubusercontent.com/b3354bf20e89dcbe1ed55f1b433ead955795581cdd7f466b68b46e7c75dbdf3f/68747470733a2f2f706f7365722e707567782e6f72672f6d617263656c74686f6c652f6f70656e6170692d6d657267652f6c6963656e7365)](//packagist.org/packages/marcelthole/openapi-merge)

Read multiple OpenAPI 3.0.x YAML and JSON files and merge them into one large file.
This application is build on [cebe/php-openapi](https://github.com/cebe/php-openapi)

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

[](#installation)

```
composer require marcelthole/openapi-merge

```

Usage
=====

[](#usage)

CLI
---

[](#cli)

```
$ vendor/bin/openapi-merge --help

Usage:
    openapi-merge basefile.yml additionalFileA.yml additionalFileB.yml [...]  > combined.yml

```

### Arguments

[](#arguments)

ArgumentMeaning--match\[=MATCH\]Use a RegEx pattern to determine the additionalFiles. If this option is set the additionalFiles could be omitted (multiple values allowed)--resolve-references\[=RESOLVE-REFERENCES\]Resolve the "$refs" in the given files \[default: true\]-o, --outputfile\[=OUTPUTFILE\]Defines the output file for the result. Defaults the result will printed to stdoutDocker
------

[](#docker)

Run the `openapi-merge` command within a docker container

```
docker pull ghcr.io/marcelthole/openapi-merge
docker run -v $PWD:/app --rm ghcr.io/marcelthole/openapi-merge [arguments]

```

Build the image locally from the sourcecode:

```
docker build --build-arg COMPOSER_REQUIRE_VERSION= --no-cache -t marcelthole/openapi-merge:dev docker
docker run -v $PWD:/app --rm marcelthole/openapi-merge:dev [arguments]

```

Outputformat
------------

[](#outputformat)

The output format is determined by the basefile extension.

###  Health Score

59

—

FairBetter than 98% of packages

Maintenance77

Regular maintenance activity

Popularity41

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 89.1% 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 ~97 days

Recently: every ~140 days

Total

21

Last Release

114d ago

Major Versions

0.3 → 1.02020-11-27

1.7.0 → 2.02024-02-18

PHP version history (8 changes)0.1PHP ^7.4 || ^8.0

1.0PHP ^7.4 || ~8.0.0

1.4PHP ^7.4 || ~8.0.0 || ~8.1.0

1.5PHP ~8.0.0 || ~8.1.0 || ~8.2.0

1.6.0PHP ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0

2.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0

2.3.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

2.5.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/850125?v=4)[Marcel Thole](/maintainers/marcelthole)[@marcelthole](https://github.com/marcelthole)

---

Top Contributors

[![marcelthole](https://avatars.githubusercontent.com/u/850125?v=4)](https://github.com/marcelthole "marcelthole (90 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![reinfi](https://avatars.githubusercontent.com/u/9324423?v=4)](https://github.com/reinfi "reinfi (4 commits)")[![bcremer](https://avatars.githubusercontent.com/u/55820?v=4)](https://github.com/bcremer "bcremer (1 commits)")[![leaortiz87](https://avatars.githubusercontent.com/u/84564666?v=4)](https://github.com/leaortiz87 "leaortiz87 (1 commits)")

---

Tags

hacktoberfestopenapiopenapi3openapimerge

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/marcelthole-openapi-merge/health.svg)

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

PHPackages © 2026

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