Skip to content

Commit

Permalink
fix for array return types
Browse files Browse the repository at this point in the history
  • Loading branch information
fehguy committed Aug 14, 2013
1 parent d76e5bf commit 5aba36b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/swagger.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/swagger.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ class SwaggerResource
produces = @produces

type = o.type || o.responseClass
if(type is "array")
ref = null
if o.items
ref = o.items["type"] || o.items["$ref"]
type = "array[" + ref + "]"

responseMessages = o.responseMessages
method = o.method
Expand Down Expand Up @@ -408,6 +413,7 @@ class SwaggerOperation
@resourceName = @resource.name

# if void clear it
console.log "model type: " + type
if(@type?.toLowerCase() is 'void') then @type = undefined
if @type?
# set the signature of response class
Expand Down

0 comments on commit 5aba36b

Please # to comment.