GitXplorerGitXplorer
h

swagger-edit

public
14 stars
4 forks
0 issues

Commits

List of commits on branch master.
Unverified
ebe53aadbd8fbed5e80bd4660b2ef4f6accc213b

change year

hhuan committed 8 years ago
Unverified
a9313aca08a809535b791cb4f5b8c9b52cebd500

fix doc

hhuan committed 8 years ago
Unverified
a8046151508aa429553ab870c501d959f2667fd9

doc

hhuan committed 8 years ago
Unverified
80cd3596c0b067ebdd43496497b37d3e43297192

doc

hhuan committed 8 years ago
Unverified
f1aa2ef92e8a3065912edea2f7d2faf688248269

doc

hhuan committed 8 years ago
Unverified
fff6a3bf5ebdbab6973ba317e7706d35b03120fc

v0.0.2

hhuan committed 8 years ago

README

The README file for this repository.

swagger-edit

Swagger-Editor for local files like VIM.

dockeri.co

The Problem

The 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?

$ swagger-edit my-api.yaml

That will be cool, also very convienence.

The Solution

Use Swagger-Edit docker image!

To edit your my-api.yaml, just run:

$ docker run -ti --rm --volume="$(pwd)":/swagger -p 8080:8080 zixia/swagger-edit my-api.yaml

Then open your browser and goto the URL: http://127.0.0.1:8080/, that's it.

Hope you like it!

Tips

For more convenience, we can setup a function as a command(in 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 zixia@zixia.net (http://linkedin.com/in/zixia)

profile for zixia at Stack Overflow, Q&A for professional and enthusiast programmers

Copyright & License

  • Code & Documentation 2017© zixia
  • Code released under the Apache 2.0 license
  • Docs released under Creative Commons