SwagBridge is a command-line tool that converts Swagger/OpenAPI specifications (swagger.yaml) into Postman collections (postman_collection.json). It simplifies the process of generating API documentation and testing collections from your existing API specifications.
- Convert Swagger/OpenAPI specs to Postman collections
- Support for multiple API platforms:
go install github.com/kics223w1/swagbridge@latest
If you see zsh: command not found: swagbridge
after installation, you need to add Go's bin directory to your PATH:
-
Add this line to your shell configuration file (
~/.zshrc
for zsh,~/.bashrc
for bash):export PATH=$PATH:$(go env GOPATH)/bin
-
Reload your shell configuration:
source ~/.zshrc # for zsh # or source ~/.bashrc # for bash
Alternatively, you can run the binary directly using:
~/go/bin/swagbridge
# Basic conversion
swagbridge -i api-specs/swagger.json -h localhost:3000 -s http -o collections/api_collection.json
- Convert a local Swagger file with host and scheme:
swagbridge -i ./api-specs/api.json -h api.example.com -s https -o ./collections/my_api.json
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.