HoS0 / SwaggerMerge

13 stars 8 forks source link

swagger-merge

Build Status Coverage Status

merging multiple swagger 2.0 JSONs into one JSON

npm install swagger-merge

Example

var swaggermerge = require('swagger-merge')
var swaggerOne = require('./swagger1.json')
var swaggerTwo = require('./swagger2.json')
var info = {
    version: "0.0.1",
    title: "merged swaggers",
    description: "all mighty services merged together\n"
}
var schemes = ['http']

swaggermerge.on('warn', function (msg) {
    console.log(msg)
})

merged = swaggermerge.merge([swaggerOne, swaggerTwo], info, '/api', 'test.com', schemes)

Running Tests

Run test by:

gulp test

This software is licensed under the MIT License.