Socket
Book a DemoInstallSign in
Socket

@rebilly/swagger-combine

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rebilly/swagger-combine

Opinionated tool to shallow-merge two or more swagger 2.0 specs into one

latest
npmnpm
Version
1.2.0
Version published
Maintainers
3
Created
Source

@rebilly/swagger-combine

Opinionated tool to shallow-merge two or more swagger 2.0 specs into one.

Install

Using npm:

 npm install @rebilly/swagger-combine

or yarn:

yarn add @rebilly/swagger-combine

Usage

const { combineSpecs } = require('@rebilly/swagger-combine');

const merged = combineSpecs([
  'https://rebilly.github.io/RebillyAPI/swagger.json',
  'https://rebilly.github.io/RebillyUserAPI/swagger.json',
  'https://rebilly.github.io/RebillyReportsAPI/swagger.json',
]);

Usage as a CLI tool

Install globally:

npm install -g @rebilly/swagger-combine

or

yarn global add @rebilly/swagger-combine

or use npx

swagger-combine <baseSpec> [specs...]

Positionals:
  baseSpec  Base spec URL                                               [string]
  specs     List of spec URLs to merge                                  [string]

Options:
  --help        Show help                                              [boolean]
  --version     Show version number                                    [boolean]
  --output, -o  Output filename, by default stdout will be used         [string]

Examples:
  [combine 3 specs]
    
    swagger-combine -o merged.json https://rebilly.github.io/RebillyAPI/swagger.json https://rebilly.github.io/RebillyUserAPI/swagger.json https://rebilly.github.io/RebillyReportsAPI/swagger.json

FAQs

Package last updated on 17 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts