add homebrew

This commit is contained in:
wing328 2015-11-05 17:12:51 +08:00
parent 30a4be833b
commit 51d9e92a00

View File

@ -21,6 +21,7 @@ Check out [Swagger-Spec](https://github.com/swagger-api/swagger-spec) for additi
- [Docker](#docker)
- [Build and run](#build-and-run-using-docker)
- [Build a Node.js server stub](#build-a-nodejs-server-stub)
- [Homebrew](#homebrew)
- Generators
- [To generate a sample client library](#to-generate-a-sample-client-library)
- [Generating libraries from your server](#generating-libraries-from-your-server)
@ -99,6 +100,15 @@ cd swagger-codegen
-o samples/server/petstore/nodejs
```
### Homebrew
To install, run `brew install swagger-codegen`
Here is an example usage:
```
swagger-codegen generate -i http://petstore.swagger.io/v2/swagger.json -l ruby -o /tmp/test/
```
### To generate a sample client library
You can build a client against the swagger sample [petstore](http://petstore.swagger.io) API as follows: