README.md in rspec-rails-api-0.1.3 vs README.md in rspec-rails-api-0.1.4
- old
+ new
@@ -239,11 +239,11 @@
```rb
on_get '/api/users/:id/posts/:post_slug?full=:full_post' do
path_params id: type: :integer, description: 'The user ID',
post_slug: type: :string, description: 'The post slug',
- full_post: type: :boolean, required: false, description: 'Returns the full post if `true`, or only an excerpt',
+ full_post: type: :boolean, required: false, description: 'Returns the full post if `true`, or only an excerpt'
# ...
end
```
@@ -269,17 +269,18 @@
```
An attribute should have the following form:
```
-<attr_name>: {type: <type>, desc: <description>, required: <required>, properties: <another_hash> }
+<attr_name>: {type: <type>, desc: <description>, required: <required>, properties: <another_hash>, of: <another_hash> }
```
- `attr_name` is the attribute name (sic)
- `type` is the field type (check _entity definition_ for a list).
`type` can be `:object` if the attribute contains other attributes.
- `required` is optional an defaults to `false`.
- `properties` is a hash of params and is only used if `type: :object`
+- `of` is a hash of params and is only used if `type: :array`
##### `for_code(http_status, description, doc_only: false &block)`
Describes the desired output for a precedently defined URL.