Skip to content

g3co/go-swagger-merger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧬 Swagger Merger

A simple CLI tool to merge multiple Swagger (OpenAPI) YAML and JSON files into a single spec.

🚀 Features

  • Merge two or more Swagger files into one
  • Supports overwrite logic based on file order
  • Ideal for modular API definitions

🛠️ Installation

Make sure you have Go installed, then run:

go get github.com/g3co/go-swagger-merger

📦 Usage

Merge two or more Swagger files into one:

go-swagger-merger -o /data/swagger.yaml /data/swagger1.yaml /data/swagger2.json

You can add as many input files as needed — supported formats include .yaml, .yml, and .json:

go-swagger-merger -o /data/swagger.json /data/swagger1.yaml /data/swagger2.yaml /data/swagger3.yaml

⚠️ Note: File order matters. Later files will overwrite conflicting fields from earlier ones.

🧪 Quick Test

Test assets are available in the repository to quickly try out the merger

About

A simple CLI tool to merge multiple Swagger (OpenAPI) YAML and JSON files into a single spec.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages