PHP code example of artarts36 / swagger-merger
1. Go to this page and download the library: Download artarts36/swagger-merger library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
artarts36 / swagger-merger example snippets
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();