Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/efureev/go-swagger-merger
https://github.com/efureev/go-swagger-merger
Last synced: about 6 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/efureev/go-swagger-merger
- Owner: efureev
- License: mit
- Created: 2023-01-09T23:15:45.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-06-12T13:47:25.000Z (over 1 year ago)
- Last Synced: 2024-06-21T09:42:31.133Z (5 months ago)
- Language: Go
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Swagger merger
To merge a few swagger YAML files into one.
Install the command line tool first.
```shell
go get github.com/efureev/go-swagger-merger
```## Docker
```shell
docker pull ghcr.io/efureev/go-swagger-merger:master
```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`.```shell
go-swagger-merger -o ./docs/swagger.yml -i ./docs/supply.yml -i ./docs/attributes.yml -i ./docs/entities.yml
go-swagger-merger -o ./docs/swagger.yml -i ./docs/categories.yml -i ./docs/tags.yml -i ./docs/terms.yml
go-swagger-merger -o ./docs/swagger.yml -i ./docs/tags.yml -i ./docs/categories.yml -i ./docs/logs.yml -i ./docs/terms.yml -i ./docs/articles.yml```
Attention. The order of the files is essential, and the following file overwrites the same fields from the previous
file.Sections that work exactly:
- Servers - Exclude duplicate
- Paths
- Tags - Exclude duplicate
- Components:
- Schemas
- Responses
- Parameters