https://github.com/gocardless/simple-swag
Dead simple swagger/openapi docs server
https://github.com/gocardless/simple-swag
Last synced: 2 months ago
JSON representation
Dead simple swagger/openapi docs server
- Host: GitHub
- URL: https://github.com/gocardless/simple-swag
- Owner: gocardless
- License: mit
- Created: 2021-06-11T13:06:06.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-08T14:47:05.000Z (over 3 years ago)
- Last Synced: 2025-02-03T10:25:07.589Z (4 months ago)
- Language: Go
- Size: 11.7 KB
- Stars: 3
- Watchers: 7
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# simple-swag
Dead simple Swagger / OpenApi docs server, under the covers we use
https://github.com/Redocly/redoc to present the docs.## Compatibilty
At the present time this server will work for OpenApi/Swagger docs version 2
or later.## Install
The easiest way to install is using go install
```
go install github.com/gocardless/simple-swag@latest
```## Usage
```
simple-swag
-filename string
a path to the swagger/openapi spec (default "~/swagger.json")
-host string
host ip to serve using (default "127.0.0.1")
-port int
port to serve http over (default 9000)
```## Troubleshooting
If you get the following error when attempting to run `simple-swag` it is
likely that Go isn't initialised properly in your shell.Add the below lines to your `~/.zshrc` file.
```
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$PATH
```
Run `source ~/.zshrc`Try running simple-swag again
## License & Contributing
* SimpleSwag is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
* Bug reports and pull requests are welcome on GitHub at https://github.com/gocardless/simple-swagGoCardless ♥ open source. If you do too, come [join us](https://gocardless.com/about/careers/).