Skip to content

Commit

Permalink
Add example for array in schema object.
Browse files Browse the repository at this point in the history
  • Loading branch information
fotinakis committed Apr 29, 2015
1 parent 30caa9c commit e7e251b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions spec/lib/swagger_v2_api_declaration.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,11 @@
"name": {
"type": "string"
},
"tag": {
"type": "string"
"colors": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
Expand Down
7 changes: 5 additions & 2 deletions spec/lib/swagger_v2_blocks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,11 @@ class PetV2
property :name do
key :type, :string
end
property :tag do
key :type, :string
property :colors do
key :type, :array
items do
key :type, :string
end
end
end

Expand Down

0 comments on commit e7e251b

Please sign in to comment.