https://github.com/huan/swagger-edit
Swagger-Editor for local files like VIM.
https://github.com/huan/swagger-edit
browser docker editor openapi specification swagger
Last synced: 9 months ago
JSON representation
Swagger-Editor for local files like VIM.
- Host: GitHub
- URL: https://github.com/huan/swagger-edit
- Owner: huan
- License: apache-2.0
- Created: 2017-02-19T14:20:11.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-20T14:21:43.000Z (almost 9 years ago)
- Last Synced: 2025-03-12T05:03:04.266Z (11 months ago)
- Topics: browser, docker, editor, openapi, specification, swagger
- Language: JavaScript
- Homepage: https://hub.docker.com/r/zixia/swagger-edit/
- Size: 12.7 KB
- Stars: 14
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# swagger-edit
Swagger-Editor for local files like VIM.
[](https://hub.docker.com/r/zixia/swagger-edit/)
## The Problem
The [Swagger Editor](http://swagger.io/swagger-editor/) is great.
However, It only open online URL. It can not open your local file directly, which is what I want to do.
How can we edit our swagger specification yaml file just like use a **VIM**?
```shell
$ swagger-edit my-api.yaml
```
That will be cool, also very convienence.
## The Solution
Use [Swagger-Edit](http://hub.docker.com/r/zixia/swagger-edit) docker image!
To edit your `my-api.yaml`, just run:
```shell
$ docker run -ti --rm --volume="$(pwd)":/swagger -p 8080:8080 zixia/swagger-edit my-api.yaml
```
Then open your browser and goto the URL: , that's it.
Hope you like it!
## Tips
For more convenience, we can setup a function as a command(in bash):
```bash
$ function swagger-edit() {
docker run -ti --rm --volume="$(pwd)":/swagger -p 8080:8080 zixia/swagger-edit "$@"
}
$ swagger-edit my-api.yaml
```
Author
-----------------
Zhuohuan LI (http://linkedin.com/in/zixia)
Copyright & License
-------------------
* Code & Documentation 2017© zixia
* Code released under the Apache 2.0 license
* Docs released under Creative Commons