Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fotinakis committed May 8, 2015
1 parent e7e251b commit 9c70b51
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,14 @@ You can then apply [security requirement objects](https://github.com/swagger-api
end
```

#### Nested complex objects

The `key` block simply takes the value you give and puts it directly into the final JSON object. So, if you need to set more complex objects, you can just do:

```ruby
key :foo, {some_complex: {nested_object: true}}
```

#### Writing JSON to a file

If you are not serving the JSON directly and need to write it to a file for some reason, you can easily use `build_root_json` for that as well:
Expand Down

0 comments on commit 9c70b51

Please sign in to comment.