定制 stefna/open-api-bundler 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

stefna/open-api-bundler

最新稳定版本:1.13.0

Composer 安装命令:

composer require stefna/open-api-bundler

包简介

Cli tool to help inline/bundle open api specifications

README 文档

README

Build Status Latest Version on Packagist Software License

Provides a cli command to help bundle up OpenAPI specifications in to one file by resolving all the external references in the schema

Installation

Requires PHP 8.2+

composer require stefna/open-api-bundler

Usage

The bundler support both json files and yaml files.

Example files

You can find examples of specifications in the examples folder

Each example should have these files:

  • schema.json input schema
  • schema.dist.json bundled output
  • schema.dist.min,json bundled minified output

Basic

> bundle basic/schema.json
{
	... bundle specification
}

Output folder specified

> bundle basic/schema.json dist
Bundling: api.json
Writing output to: dist/schema.json

Output file specified

> bundle basic/schema.json basic/schema.dist.json
Bundling: api.json
Writing output to: basic/schema.dist.json

Bundle compression

> bundle basic/schema.json --compress
{... specification without whitespace ...}

Framework integrations

Starburst

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

Contribute

We are always happy to receive bug/security reports and bug/security fixes

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 5.65k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-05