From ca853fc78c44b6fab5ed20a41f373658040990c0 Mon Sep 17 00:00:00 2001 From: Cliffano Subagio Date: Tue, 13 Jun 2017 23:22:57 +1000 Subject: [PATCH] Add usage and configuration notes. --- README.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ff42327..93ee2ba 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,28 @@ Installation Usage ----- -TODO +Build a JavaScript API client with a given spec: + + swaggy-c --api-spec /path/to/spec.yaml + +The generated JavaScript client will then be written to `//` directory. + +Build the client using Swagger CodeGen CLI jar: + + swaggy-c --jar /path/to/swagger-codegen-cli.jar --api-spec /path/to/spec.yaml + +Build the client using specific configuration, output, and log directories: + + swaggy-c --conf-dir /path/to/conf/ --out-dir /path/to/generated/ --log-dir /path/to/log --api-spec /path/to/spec.yaml + +Build the client and supress Swagger CodeGen CLI command output: + + swaggy-c --quiet --api-spec /path/to/spec.yaml + +Configuration +------------- + +Swagger CodeGen language configuration file should be placed at `/.json` . Colophon -------- @@ -41,4 +62,4 @@ Related Projects: * [packer-swaggy-c](http://github.com/cliffano/packer-swaggy-c) - Packer builder of a Docker image that contains most languages supported by Swagger CodeGen * [swaggy-jenkins](http://github.com/cliffano/swaggy-jenkins) - Generated Jenkins API clients based on OpenAPI spec -* [swaggy-jenkins-cli](http://github.com/cliffano/swaggy-jenkins-cli) - CLI utility tool for Swaggy Jenkins \ No newline at end of file +* [swaggy-jenkins-cli](http://github.com/cliffano/swaggy-jenkins-cli) - CLI utility tool for Swaggy Jenkins