go-swagger-merger icon indicating copy to clipboard operation
go-swagger-merger copied to clipboard

Merge is not working

Open tayyab-elahi opened this issue 2 years ago • 1 comments

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

tayyab-elahi avatar Jan 17 '23 10:01 tayyab-elahi

I confirm that when we merge 2 files that have the same paths (endpoint url) but two different methods (get vs post), only the last file is considered, when the 2 paths are different it all goes smooth.

I have attached 2 files to show the glitch, updating the path of one of them would show the well functioning of the merge function

assets-1.oas3.json assets.oas3.json

SeaX avatar Nov 07 '23 00:11 SeaX