Permalink
Browse files

changed name of command for generating example api

  • Loading branch information...
automatthew committed Nov 12, 2013
1 parent 95ead0a commit b8b5abae8321bfac9e3ecdea6b099433c7966395
Showing with 6 additions and 6 deletions.
  1. +1 −1 README.md
  2. +3 −3 bin/patchboard
  3. +1 −1 doc/README.template.md
  4. +1 −1 src/tools.coffee
View
@@ -129,7 +129,7 @@ Patchboard includes a [JSON Schema][patchboard-def-schema] that describes a vali
You can also print a basic example definition to STDOUT.
bin/patchboard generate json # or cson
bin/patchboard example json # or cson
### Patchboard.Server
View
@@ -11,16 +11,16 @@ switch command
tools.validate(api_file)
else
console.log "You must specify the path to the API definition file"
when "generate"
when "example"
[type] = args
if type
tools.generate(type)
tools.example(type)
else
console.log "You must specify a type of either json or cson"
when "schema"
console.log JSON.stringify(require("../schema"), null, 2)
when undefined
console.log "You must enter a command (validate, generate, schema)"
console.log "You must enter a command (validate, example, schema)"
else
console.log "Unsupported command: #{command}"
View
@@ -46,7 +46,7 @@ Patchboard includes a [JSON Schema][patchboard-def-schema] that describes a vali
You can also print a basic example definition to STDOUT.
bin/patchboard generate json # or cson
bin/patchboard example json # or cson
### Patchboard.Server
View
@@ -57,7 +57,7 @@ module.exports =
console.log "Problem reading API description:", error.message
process.exit(1)
generate: (type) ->
example: (type) ->
if type == "json"
api = example
string = JSON.stringify(api, null, 2)

0 comments on commit b8b5aba

Please sign in to comment.