Provides a cli command to help bundle up OpenAPI specifications in to one file by resolving all the external references in the schema
Requires PHP 8.2+
composer require stefna/open-api-bundler
The bundler support both json files and yaml files.
You can find examples of specifications in the examples folder
Each example should have these files:
schema.json
input schemaschema.dist.json
bundled outputschema.dist.min,json
bundled minified output
> bundle basic/schema.json
{
... bundle specification
}
> bundle basic/schema.json dist
Bundling: api.json
Writing output to: dist/schema.json
> bundle basic/schema.json basic/schema.dist.json
Bundling: api.json
Writing output to: basic/schema.dist.json
> bundle basic/schema.json --compress
{... specification without whitespace ...}
To add this command to starburst-cli just add OpenApiBundleBootstrap
to your bootstrap config.
When using this with starburst you can add BundleConfig
to your di to change the default values for the bundle
command
We are always happy to receive bug/security reports and bug/security fixes
The MIT License (MIT). Please see License File for more information.