Giter Club home page Giter Club logo

go-swagger-merger's Introduction

Swagger merger

To merge a few swagger YAML files into one.

Install Go if you don't have one.

https://golang.org/doc/install

Install the command line tool first.

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

The command below will merge /data/swagger1.yaml /data/swagger2.yaml and save result file in the /data/swagger.yaml. The library supports more than two files to merge. You can add more paths to the list /data/swagger3.yaml, /data/swaggerN.yaml.

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

Attention. The order of the files is essential, and the following file overwrites the same fields from the previous file.

go-swagger-merger's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

go-swagger-merger's Issues

Merge is not working

I have 2 microservices, I want to merge the their swagger.yaml files and then serve with swagger-cli to use that final merged file.
Issue is that I run this command and It creates new yaml file only with content of input yaml from the last parameter of command.
go-swagger-merger -o final_swagger.yaml network-service/docs/swagger.yaml controller-service/docs/swagger.yaml

The final_swagger.yaml contains content only from controller-service/docs/swagger.yaml and nothing from network-service/docs/swagger.yaml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.