artarts36/swagger-merger

Swagger Merger

0.2.0 2020-09-30 23:00 UTC

This package is auto-updated.

Last update: 2021-09-29 02:17:07 UTC


README

Installation

composer require artarts36/swagger-merger

Usage:

use ArtARTs36\SwaggerMerger\Info;
use ArtARTs36\SwaggerMerger\Merger;

Merger::byJsonFile('api-docs.json')
    ->addJsonFile('package-api-docs.json')
    ->addYamlFile('package-api-docs.yml')
    ->addYamlFileWithPrefixes('package2-api-docs.yml', function (Info $info) {
        $info->setDescriptionPrefix('Package 2 :: ');
        $info->setTagsPrefix('Package 2 :: ');
    })
    ->saveAsJson();