artarts36/swagger-merger

Swagger Merger

0.2.2 2021-10-30 22:35 UTC

This package is auto-updated.

Last update: 2024-11-29 06:28:46 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();