Skip to content

kics223w1/SwagBridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwagBridge

Description

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.

Features

  • Convert Swagger/OpenAPI specs to Postman collections
  • Support for multiple API platforms:

Installation

go install github.com/kics223w1/swagbridge@latest

Troubleshooting Installation

If you see zsh: command not found: swagbridge after installation, you need to add Go's bin directory to your PATH:

  1. Add this line to your shell configuration file (~/.zshrc for zsh, ~/.bashrc for bash):

    export PATH=$PATH:$(go env GOPATH)/bin
  2. Reload your shell configuration:

    source ~/.zshrc  # for zsh
    # or
    source ~/.bashrc # for bash

Alternatively, you can run the binary directly using:

~/go/bin/swagbridge

Usage

# Basic conversion
swagbridge -i api-specs/swagger.json -h localhost:3000 -s http -o collections/api_collection.json

Examples

  1. 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

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published