marcelthole / openapi-merge
Merge multiple OpenAPI YML/JSON files into one
Installs: 33 821
Dependents: 2
Suggesters: 0
Security: 0
Stars: 15
Watchers: 2
Forks: 6
Open Issues: 1
Type:application
Requires
- php: ~8.1.0 || ~8.2.0 || ~8.3.0
- php-openapi/openapi: ^2.0.1
- symfony/console: ^6.0 || ^7.0
Requires (Dev)
- doctrine/coding-standard: ^12.0.0
- infection/infection: ^0.29.6
- phpstan/phpstan: ^1.11.0
- phpstan/phpstan-phpunit: ^1.4.0
- phpunit/phpunit: ^10.1 || ^11.0
- roave/security-advisories: dev-master
README
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
Installation
composer require marcelthole/openapi-merge
Usage
CLI
$ vendor/bin/openapi-merge --help
Usage:
openapi-merge basefile.yml additionalFileA.yml additionalFileB.yml [...] > combined.yml
Arguments
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=<version> --no-cache -t marcelthole/openapi-merge:dev docker
docker run -v $PWD:/app --rm marcelthole/openapi-merge:dev [arguments]
Outputformat
The output format is determined by the basefile extension.